#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 */
char getchar();
void *hash(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, long);
int /*<<< orphan*/ strcat(char *, char *);
int strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
int main() {
  struct occurance_t {
    long h1;
    int num1;
    char w[200];
  } r[3000];
  char wr1[200];
  char wr[200];
  int i, j, k, k1, hind, flag, n;
  long wh, wh1, ww;
  char ch2;
  char *ch, ch1;
  ch = "";
  ch2 = 10;
  for (i = 0; i < 3000; i++) {
    r[i].num1 = 0;
    r[i].h1 = 0;
    strcpy(r[i].w, ch);
  }
  hind = 0;
  scanf("%s", wr1);
  ch1 = getchar();
  r[hind].num1 = 1;
  r[hind].h1 = hash(wr1);
  strcpy(r[hind++].w, wr1);
  flag = 0;
  while (ch1 != ch2 && flag == 0) {
    scanf("%s", wr1);
    ch1 = getchar();
    {
      r[hind].num1 = 1;
      r[hind].h1 = hash(wr1);
      strcpy(r[hind].w, wr1);
      for (i = 0; i <= hind; i++) {
        r[i].num1 = 1;
      }
      for (i = 0; i <= hind; i++) {
        wh = r[i].h1;
        for (j = i + 1; j <= hind; j++) {
          if (r[j].h1 == wh) {
            k1 = strcmp(r[i].w, r[j].w);
            if (k1 != 0) {
              r[i].num1++;
              r[j].num1++;
              if (r[j].num1 > 3)
                flag = 1;
            } else {
              r[j].h1 = 0;
            }
          }
        }
      }
      hind++;
    }
  }
  for (i = hind; i > 0; i--) {
    for (j = 0; j < i - 1; j++) {
      if (r[j].h1 > r[j + 1].h1) {
        ww = r[j].h1;
        strcpy(wr, r[j].w);
        k = r[j].num1;
        r[j].h1 = r[j + 1].h1;
        strcpy(r[j].w, r[j + 1].w);
        r[j].num1 = r[j + 1].num1;
        r[j + 1].h1 = ww;
        strcpy(r[j + 1].w, wr);
        r[j + 1].num1 = k;
      }
    }
  }
  n = 0;
  for (i = 0; i < hind; i++) {
    if (r[i].num1 > 1) {
      wh = r[i].h1;
      strcpy(wr, "\0");
      for (j = 0; j < hind; j++) {
        if (wh == r[j].h1) {
          if (strlen(wr) == 0) {
            wh1 = r[j].h1;
            if (wh1 != 0)
              sprintf(wr1, "%ld ", wh1);
            strcat(wr, wr1);
            strcat(wr, r[j].w);
          } else {
            strcat(wr, r[j].w);
          }
          strcat(wr, " ");
          r[j].num1 = 0;
        }
      }
      if (i != (hind - 1) && n > 0 && n != 1) {
        if (wh1 != 0)
          printf("\n");
      }
      if (wh1 != 0)
        printf("%s", wr);
      n++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9e540,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe60(%rip),%rax
mov    %rax,-0x9e538(%rbp)
movb   $0xa,-0x9e529(%rbp)
movl   $0x0,-0x9e4f4(%rbp)
cmpl   $0xbb8,-0x9e4f4(%rbp)
jge    124b <main+0xbb>
movslq -0x9e4f4(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
movl   $0x0,0x8(%rax)
movslq -0x9e4f4(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
movq   $0x0,(%rax)
movslq -0x9e4f4(%rbp),%rax
lea    -0x9e350(%rbp),%rdi
imul   $0xd8,%rax,%rax
add    %rax,%rdi
add    $0xc,%rdi
mov    -0x9e538(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x9e4f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e4f4(%rbp)
jmp    11c1 <main+0x31>
movl   $0x0,-0x9e504(%rbp)
lea    -0x9e420(%rbp),%rsi
lea    0xd9d(%rip),%rdi
call   1090 <scanf@plt>
mov    $0x0,%al
call   1080 <getchar@plt>
mov    %al,-0x9e539(%rbp)
movslq -0x9e504(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
movl   $0x1,0x8(%rax)
lea    -0x9e420(%rbp),%rdi
call   1050 <hash@plt>
mov    %rax,%rcx
movslq -0x9e504(%rbp),%rdx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rdx,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x9e504(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x9e504(%rbp)
cltq
lea    -0x9e350(%rbp),%rdi
imul   $0xd8,%rax,%rax
add    %rax,%rdi
add    $0xc,%rdi
lea    -0x9e420(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x9e508(%rbp)
movsbl -0x9e539(%rbp),%ecx
movsbl -0x9e529(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x9e53a(%rbp)
je     132a <main+0x19a>
cmpl   $0x0,-0x9e508(%rbp)
sete   %al
mov    %al,-0x9e53a(%rbp)
mov    -0x9e53a(%rbp),%al
test   $0x1,%al
jne    133d <main+0x1ad>
jmp    15d1 <main+0x441>
lea    -0x9e420(%rbp),%rsi
lea    0xcb5(%rip),%rdi
call   1090 <scanf@plt>
mov    $0x0,%al
call   1080 <getchar@plt>
mov    %al,-0x9e539(%rbp)
movslq -0x9e504(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
movl   $0x1,0x8(%rax)
lea    -0x9e420(%rbp),%rdi
call   1050 <hash@plt>
mov    %rax,%rcx
movslq -0x9e504(%rbp),%rdx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rdx,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
movslq -0x9e504(%rbp),%rax
lea    -0x9e350(%rbp),%rdi
imul   $0xd8,%rax,%rax
add    %rax,%rdi
add    $0xc,%rdi
lea    -0x9e420(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x9e4f4(%rbp)
mov    -0x9e4f4(%rbp),%eax
cmp    -0x9e504(%rbp),%eax
jg     141d <main+0x28d>
movslq -0x9e4f4(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
movl   $0x1,0x8(%rax)
mov    -0x9e4f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e4f4(%rbp)
jmp    13d8 <main+0x248>
movl   $0x0,-0x9e4f4(%rbp)
mov    -0x9e4f4(%rbp),%eax
cmp    -0x9e504(%rbp),%eax
jg     15bd <main+0x42d>
movslq -0x9e4f4(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x9e518(%rbp)
mov    -0x9e4f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e4f8(%rbp)
mov    -0x9e4f8(%rbp),%eax
cmp    -0x9e504(%rbp),%eax
jg     15a4 <main+0x414>
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rax
cmp    -0x9e518(%rbp),%rax
jne    158b <main+0x3fb>
movslq -0x9e4f4(%rbp),%rax
lea    -0x9e350(%rbp),%rdi
imul   $0xd8,%rax,%rax
add    %rax,%rdi
add    $0xc,%rdi
movslq -0x9e4f8(%rbp),%rax
lea    -0x9e350(%rbp),%rsi
imul   $0xd8,%rax,%rax
add    %rax,%rsi
add    $0xc,%rsi
call   1070 <strcmp@plt>
mov    %eax,-0x9e500(%rbp)
cmpl   $0x0,-0x9e500(%rbp)
je     1567 <main+0x3d7>
movslq -0x9e4f4(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0x8(%rax)
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0x8(%rax)
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
cmpl   $0x3,0x8(%rax)
jle    1562 <main+0x3d2>
movl   $0x1,-0x9e508(%rbp)
jmp    1586 <main+0x3f6>
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
movq   $0x0,(%rax)
jmp    158b <main+0x3fb>
jmp    1590 <main+0x400>
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e4f8(%rbp)
jmp    146a <main+0x2da>
jmp    15a9 <main+0x419>
mov    -0x9e4f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e4f4(%rbp)
jmp    1427 <main+0x297>
mov    -0x9e504(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e504(%rbp)
jmp    12fc <main+0x16c>
mov    -0x9e504(%rbp),%eax
mov    %eax,-0x9e4f4(%rbp)
cmpl   $0x0,-0x9e4f4(%rbp)
jle    1819 <main+0x689>
movl   $0x0,-0x9e4f8(%rbp)
mov    -0x9e4f8(%rbp),%eax
mov    -0x9e4f4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1800 <main+0x670>
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    -0x9e4f8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rdx
lea    -0x9e350(%rbp),%rcx
imul   $0xd8,%rdx,%rdx
add    %rdx,%rcx
cmp    (%rcx),%rax
jle    17e7 <main+0x657>
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x9e528(%rbp)
lea    -0x9e4f0(%rbp),%rdi
movslq -0x9e4f8(%rbp),%rax
lea    -0x9e350(%rbp),%rsi
imul   $0xd8,%rax,%rax
add    %rax,%rsi
add    $0xc,%rsi
call   1030 <strcpy@plt>
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%eax
mov    %eax,-0x9e4fc(%rbp)
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rcx
movslq -0x9e4f8(%rbp),%rdx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rdx,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
movslq -0x9e4f8(%rbp),%rax
lea    -0x9e350(%rbp),%rdi
imul   $0xd8,%rax,%rax
add    %rax,%rdi
add    $0xc,%rdi
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
cltq
lea    -0x9e350(%rbp),%rsi
imul   $0xd8,%rax,%rax
add    %rax,%rsi
add    $0xc,%rsi
call   1030 <strcpy@plt>
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%ecx
movslq -0x9e4f8(%rbp),%rdx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x8(%rax)
mov    -0x9e528(%rbp),%rcx
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rdx,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
cltq
lea    -0x9e350(%rbp),%rdi
imul   $0xd8,%rax,%rax
add    %rax,%rdi
add    $0xc,%rdi
lea    -0x9e4f0(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x9e4fc(%rbp),%ecx
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x8(%rax)
jmp    17ec <main+0x65c>
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e4f8(%rbp)
jmp    15f4 <main+0x464>
jmp    1805 <main+0x675>
mov    -0x9e4f4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x9e4f4(%rbp)
jmp    15dd <main+0x44d>
movl   $0x0,-0x9e50c(%rbp)
movl   $0x0,-0x9e4f4(%rbp)
mov    -0x9e4f4(%rbp),%eax
cmp    -0x9e504(%rbp),%eax
jge    1a8a <main+0x8fa>
movslq -0x9e4f4(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
cmpl   $0x1,0x8(%rax)
jle    1a71 <main+0x8e1>
movslq -0x9e4f4(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x9e518(%rbp)
lea    -0x9e4f0(%rbp),%rdi
lea    0x779(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x9e4f8(%rbp)
mov    -0x9e4f8(%rbp),%eax
cmp    -0x9e504(%rbp),%eax
jge    19ed <main+0x85d>
mov    -0x9e518(%rbp),%rax
movslq -0x9e4f8(%rbp),%rdx
lea    -0x9e350(%rbp),%rcx
imul   $0xd8,%rdx,%rdx
add    %rdx,%rcx
cmp    (%rcx),%rax
jne    19d4 <main+0x844>
lea    -0x9e4f0(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jne    197a <main+0x7ea>
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x9e520(%rbp)
cmpq   $0x0,-0x9e520(%rbp)
je     193a <main+0x7aa>
lea    -0x9e420(%rbp),%rdi
mov    -0x9e520(%rbp),%rdx
lea    0x6ce(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x9e4f0(%rbp),%rdi
lea    -0x9e420(%rbp),%rsi
call   10a0 <strcat@plt>
lea    -0x9e4f0(%rbp),%rdi
movslq -0x9e4f8(%rbp),%rax
lea    -0x9e350(%rbp),%rsi
imul   $0xd8,%rax,%rax
add    %rax,%rsi
add    $0xc,%rsi
call   10a0 <strcat@plt>
jmp    19a2 <main+0x812>
lea    -0x9e4f0(%rbp),%rdi
movslq -0x9e4f8(%rbp),%rax
lea    -0x9e350(%rbp),%rsi
imul   $0xd8,%rax,%rax
add    %rax,%rsi
add    $0xc,%rsi
call   10a0 <strcat@plt>
lea    -0x9e4f0(%rbp),%rdi
lea    0x656(%rip),%rsi
call   10a0 <strcat@plt>
movslq -0x9e4f8(%rbp),%rcx
lea    -0x9e350(%rbp),%rax
imul   $0xd8,%rcx,%rcx
add    %rcx,%rax
movl   $0x0,0x8(%rax)
jmp    19d9 <main+0x849>
mov    -0x9e4f8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e4f8(%rbp)
jmp    18a0 <main+0x710>
mov    -0x9e4f4(%rbp),%eax
mov    -0x9e504(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1a3f <main+0x8af>
cmpl   $0x0,-0x9e50c(%rbp)
jle    1a3f <main+0x8af>
cmpl   $0x1,-0x9e50c(%rbp)
je     1a3f <main+0x8af>
cmpq   $0x0,-0x9e520(%rbp)
je     1a3a <main+0x8aa>
lea    0x5d5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1a3f <main+0x8af>
cmpq   $0x0,-0x9e520(%rbp)
je     1a62 <main+0x8d2>
lea    -0x9e4f0(%rbp),%rsi
lea    0x5a5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x9e50c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e50c(%rbp)
jmp    1a76 <main+0x8e6>
mov    -0x9e4f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9e4f4(%rbp)
jmp    182d <main+0x69d>
xor    %eax,%eax
add    $0x9e540,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9e518,%rsp
lea    0x1dc(%rsp),%rbx
mov    $0xbb8,%ebp
lea    0xe52(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
movl   $0x0,-0x4(%rbx)
movq   $0x0,-0xc(%rbx)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
add    $0xd8,%rbx
add    $0xffffffffffffffff,%rbp
jne    11c0 <main+0x30>
lea    0xe12(%rip),%rdi
lea    0x100(%rsp),%rbp
mov    %rbp,%rsi
call   1090 <scanf@plt>
xor    %eax,%eax
call   1080 <getchar@plt>
mov    %eax,%ebx
movl   $0x1,0x1d8(%rsp)
mov    %rbp,%rdi
call   1050 <hash@plt>
mov    %rax,0x1d0(%rsp)
lea    0x1dc(%rsp),%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    $0x1,%ebp
cmp    $0xa,%bl
je     144f <main+0x2bf>
mov    $0x2,%eax
mov    %rax,0x8(%rsp)
mov    $0x1,%ebp
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r15
lea    0xd95(%rip),%rdi
lea    0x100(%rsp),%r14
mov    %r14,%rsi
call   1090 <scanf@plt>
xor    %eax,%eax
call   1080 <getchar@plt>
mov    %al,0x7(%rsp)
imul   $0xd8,%rbp,%rbx
movl   $0x1,0x1d8(%rsp,%rbx,1)
mov    %r14,%rdi
call   1050 <hash@plt>
mov    %rax,0x1d0(%rsp,%rbx,1)
lea    (%rsp,%rbx,1),%rdi
add    $0x1dc,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
cmp    $0x3,%r15
jae    12d0 <main+0x140>
xor    %eax,%eax
jmp    1324 <main+0x194>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%rsp),%rcx
and    $0xfffffffffffffffc,%rcx
lea    0x460(%rsp),%rdx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movl   $0x1,-0x288(%rdx)
movl   $0x1,-0x1b0(%rdx)
movl   $0x1,-0xd8(%rdx)
movl   $0x1,(%rdx)
add    $0x4,%rax
add    $0x360,%rdx
cmp    %rax,%rcx
jne    12f0 <main+0x160>
mov    %r15,0x28(%rsp)
testb  $0x3,0x8(%rsp)
je     1373 <main+0x1e3>
mov    0x8(%rsp),%rcx
and    $0x3,%ecx
imul   $0xd8,%rcx,%rcx
imul   $0xd8,%rax,%rax
lea    0x1d8(%rsp),%rdx
add    %rdx,%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movl   $0x1,(%rax,%rdx,1)
add    $0xd8,%rdx
cmp    %rdx,%rcx
jne    1360 <main+0x1d0>
xor    %eax,%eax
mov    %rbp,%r13
lea    0x2b4(%rsp),%r15
xor    %r12d,%r12d
mov    %rbp,0x20(%rsp)
jmp    13b1 <main+0x221>
nopw   0x0(%rax,%rax,1)
add    $0xd8,%r15
mov    0x18(%rsp),%r13
add    $0xffffffffffffffff,%r13
mov    0x10(%rsp),%rax
cmp    0x8(%rsp),%rax
mov    0x20(%rsp),%rbp
je     1430 <main+0x2a0>
lea    0x1(%rax),%rcx
mov    %rcx,0x10(%rsp)
cmp    %rbp,%rax
mov    %r13,0x18(%rsp)
jae    1390 <main+0x200>
imul   $0xd8,%rax,%rax
mov    0x1d0(%rsp,%rax,1),%r14
lea    (%rsp,%rax,1),%rbp
add    $0x1dc,%rbp
mov    %r15,%rbx
jmp    13fd <main+0x26d>
movq   $0x0,-0xc(%rbx)
nopl   0x0(%rax,%rax,1)
add    $0xd8,%rbx
add    $0xffffffffffffffff,%r13
je     1390 <main+0x200>
cmp    %r14,-0xc(%rbx)
jne    13f0 <main+0x260>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13e3 <main+0x253>
addl   $0x1,-0x4(%rbp)
mov    -0x4(%rbx),%eax
lea    0x1(%rax),%ecx
mov    %ecx,-0x4(%rbx)
cmp    $0x3,%eax
mov    $0x1,%eax
cmovge %eax,%r12d
jmp    13f0 <main+0x260>
nopl   (%rax)
add    $0x1,%rbp
cmpb   $0xa,0x7(%rsp)
mov    0x28(%rsp),%r15
je     144f <main+0x2bf>
addq   $0x1,0x8(%rsp)
test   %r12d,%r12d
je     1260 <main+0xd0>
lea    -0x1(%rbp),%r12d
mov    %r12,0x8(%rsp)
mov    %r12,%rax
mov    %rbp,0x20(%rsp)
jmp    1485 <main+0x2f5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0xffffffffffffffff,%rax
cmpl   $0x2,0x18(%rsp)
mov    0x10(%rsp),%ecx
mov    %ecx,%ebp
jl     1524 <main+0x394>
cmp    $0x2,%ebp
jl     1524 <main+0x394>
mov    %rbp,0x18(%rsp)
lea    -0x1(%rbp),%ecx
mov    %ecx,0x10(%rsp)
lea    0x2b4(%rsp),%rbp
xor    %r15d,%r15d
jmp    14bc <main+0x32c>
nopw   0x0(%rax,%rax,1)
add    $0xd8,%rbp
cmp    %r15,%rax
je     1470 <main+0x2e0>
mov    -0xe4(%rbp),%r13
add    $0x1,%r15
cmp    -0xc(%rbp),%r13
jle    14b0 <main+0x320>
lea    -0xd8(%rbp),%rbx
lea    0x30(%rsp),%rdi
mov    %rbx,%rsi
mov    %rax,%r12
call   1040 <strcpy@plt>
mov    -0xdc(%rbp),%r14d
mov    -0xc(%rbp),%rax
mov    %rax,-0xe4(%rbp)
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    %r13,-0xc(%rbp)
mov    %rbp,%rdi
lea    0x30(%rsp),%rsi
call   1040 <strcpy@plt>
mov    %r12,%rax
mov    %r14d,-0x4(%rbp)
jmp    14b0 <main+0x320>
mov    0x20(%rsp),%rax
cmp    $0x2,%eax
mov    $0x1,%r13d
cmovae %eax,%r13d
lea    0x30(%rsp),%r15
xor    %r12d,%r12d
xor    %ebp,%ebp
mov    %r13,0x10(%rsp)
jmp    1560 <main+0x3d0>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebp
add    $0x1,%r12
cmp    %r13,%r12
je     1657 <main+0x4c7>
imul   $0xd8,%r12,%rax
cmpl   $0x2,0x1d8(%rsp,%rax,1)
02
jl     1553 <main+0x3c3>
mov    %ebp,0x18(%rsp)
mov    0x1d0(%rsp,%rax,1),%rbp
mov    %r15,%rdi
lea    0xa81(%rip),%rsi
call   1040 <strcpy@plt>
lea    0x1dc(%rsp),%r14
jmp    15d3 <main+0x443>
mov    %r15,%rdi
mov    %rbx,%rsi
call   10a0 <strcat@plt>
mov    %rbp,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
call   10a0 <strcat@plt>
mov    %r15,%rdi
lea    0xa4d(%rip),%rsi
call   10a0 <strcat@plt>
movl   $0x0,-0x4(%r14)
add    $0xd8,%r14
add    $0xffffffffffffffff,%r13
je     1610 <main+0x480>
cmp    -0xc(%r14),%rbp
jne    15c6 <main+0x436>
cmpb   $0x0,0x30(%rsp)
jne    15a4 <main+0x414>
test   %rbp,%rbp
lea    0x100(%rsp),%rbx
je     1596 <main+0x406>
mov    %rbx,%rdi
lea    0xa0c(%rip),%rsi
mov    %rbp,%rdx
call   10b0 <sprintf@plt>
jmp    1596 <main+0x406>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    0x8(%rsp),%r12
mov    0x18(%rsp),%ebp
je     1633 <main+0x4a3>
test   %ebp,%ebp
jle    1633 <main+0x4a3>
cmp    $0x1,%ebp
je     1633 <main+0x4a3>
test   %rbx,%rbx
je     1633 <main+0x4a3>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %rbx,%rbx
mov    0x10(%rsp),%r13
je     1550 <main+0x3c0>
lea    0x9b8(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1550 <main+0x3c0>
xor    %eax,%eax
add    $0x9e518,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.occurance_t = type { i64, i32, [200 x i8] }
@.str = [1 x i8] zeroinitializer
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] zeroinitializer
@.str.3 = [5 x i8] c"%ld \00"
@.str.4 = [2 x i8] c" \00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3000 x %struct.occurance_t]
%3 = alloca [200 x i8]
%4 = alloca [200 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i8
%16 = alloca i8*
%17 = alloca i8
store i32 0, i32* %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %16
store i8 10, i8* %15
store i32 0, i32* %5
br label %18
18: ; preds = %37, %0
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 3000
br i1 %20, label %21, label %40
21: ; preds = %18
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %23
%25 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %24, i32 0, i32 1
store i32 0, i32* %25
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %27
%29 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %28, i32 0, i32 0
store i64 0, i64* %29
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %31
%33 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %32, i32 0, i32 2
%34 = getelementptr inbounds [200 x i8], [200 x i8]* %33, i64 0, i64 0
%35 = load i8*, i8** %16
%36 = call i32 @strcpy(i8* %34, i8* %35)
br label %37
37: ; preds = %21
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %18
40: ; preds = %18
store i32 0, i32* %9
%41 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %41)
%43 = call signext i8 (...) @getchar()
store i8 %43, i8* %17
%44 = load i32, i32* %9
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %45
%47 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %46, i32 0, i32 1
store i32 1, i32* %47
%48 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%49 = call i8* @hash(i8* %48)
%50 = ptrtoint i8* %49 to i64
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %52
%54 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %53, i32 0, i32 0
store i64 %50, i64* %54
%55 = load i32, i32* %9
%56 = add nsw i32 %55, 1
store i32 %56, i32* %9
%57 = sext i32 %55 to i64
%58 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %57
%59 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %58, i32 0, i32 2
%60 = getelementptr inbounds [200 x i8], [200 x i8]* %59, i64 0, i64 0
%61 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%62 = call i32 @strcpy(i8* %60, i8* %61)
store i32 0, i32* %10
br label %63
63: ; preds = %182, %40
%64 = load i8, i8* %17
%65 = sext i8 %64 to i32
%66 = load i8, i8* %15
%67 = sext i8 %66 to i32
%68 = icmp ne i32 %65, %67
br i1 %68, label %69, label %72
69: ; preds = %63
%70 = load i32, i32* %10
%71 = icmp eq i32 %70, 0
br label %72
72: ; preds = %69, %63
%73 = phi i1 [ false, %63 ], [ %71, %69 ]
br i1 %73, label %74, label %185
74: ; preds = %72
%75 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%76 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %75)
%77 = call signext i8 (...) @getchar()
store i8 %77, i8* %17
%78 = load i32, i32* %9
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %79
%81 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %80, i32 0, i32 1
store i32 1, i32* %81
%82 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%83 = call i8* @hash(i8* %82)
%84 = ptrtoint i8* %83 to i64
%85 = load i32, i32* %9
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %86
%88 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %87, i32 0, i32 0
store i64 %84, i64* %88
%89 = load i32, i32* %9
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %90
%92 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %91, i32 0, i32 2
%93 = getelementptr inbounds [200 x i8], [200 x i8]* %92, i64 0, i64 0
%94 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%95 = call i32 @strcpy(i8* %93, i8* %94)
store i32 0, i32* %5
br label %96
96: ; preds = %105, %74
%97 = load i32, i32* %5
%98 = load i32, i32* %9
%99 = icmp sle i32 %97, %98
br i1 %99, label %100, label %108
100: ; preds = %96
%101 = load i32, i32* %5
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %102
%104 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %103, i32 0, i32 1
store i32 1, i32* %104
br label %105
105: ; preds = %100
%106 = load i32, i32* %5
%107 = add nsw i32 %106, 1
store i32 %107, i32* %5
br label %96
108: ; preds = %96
store i32 0, i32* %5
br label %109
109: ; preds = %179, %108
%110 = load i32, i32* %5
%111 = load i32, i32* %9
%112 = icmp sle i32 %110, %111
br i1 %112, label %113, label %182
113: ; preds = %109
%114 = load i32, i32* %5
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %115
%117 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %116, i32 0, i32 0
%118 = load i64, i64* %117
store i64 %118, i64* %12
%119 = load i32, i32* %5
%120 = add nsw i32 %119, 1
store i32 %120, i32* %6
br label %121
121: ; preds = %175, %113
%122 = load i32, i32* %6
%123 = load i32, i32* %9
%124 = icmp sle i32 %122, %123
br i1 %124, label %125, label %178
125: ; preds = %121
%126 = load i32, i32* %6
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %127
%129 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %128, i32 0, i32 0
%130 = load i64, i64* %129
%131 = load i64, i64* %12
%132 = icmp eq i64 %130, %131
br i1 %132, label %133, label %174
133: ; preds = %125
%134 = load i32, i32* %5
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %135
%137 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %136, i32 0, i32 2
%138 = getelementptr inbounds [200 x i8], [200 x i8]* %137, i64 0, i64 0
%139 = load i32, i32* %6
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %140
%142 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %141, i32 0, i32 2
%143 = getelementptr inbounds [200 x i8], [200 x i8]* %142, i64 0, i64 0
%144 = call i32 @strcmp(i8* %138, i8* %143)
store i32 %144, i32* %8
%145 = load i32, i32* %8
%146 = icmp ne i32 %145, 0
br i1 %146, label %147, label %168
147: ; preds = %133
%148 = load i32, i32* %5
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %149
%151 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %150, i32 0, i32 1
%152 = load i32, i32* %151
%153 = add nsw i32 %152, 1
store i32 %153, i32* %151
%154 = load i32, i32* %6
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %155
%157 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %156, i32 0, i32 1
%158 = load i32, i32* %157
%159 = add nsw i32 %158, 1
store i32 %159, i32* %157
%160 = load i32, i32* %6
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %161
%163 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %162, i32 0, i32 1
%164 = load i32, i32* %163
%165 = icmp sgt i32 %164, 3
br i1 %165, label %166, label %167
166: ; preds = %147
store i32 1, i32* %10
br label %167
167: ; preds = %166, %147
br label %173
168: ; preds = %133
%169 = load i32, i32* %6
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %170
%172 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %171, i32 0, i32 0
store i64 0, i64* %172
br label %173
173: ; preds = %168, %167
br label %174
174: ; preds = %173, %125
br label %175
175: ; preds = %174
%176 = load i32, i32* %6
%177 = add nsw i32 %176, 1
store i32 %177, i32* %6
br label %121
178: ; preds = %121
br label %179
179: ; preds = %178
%180 = load i32, i32* %5
%181 = add nsw i32 %180, 1
store i32 %181, i32* %5
br label %109
182: ; preds = %109
%183 = load i32, i32* %9
%184 = add nsw i32 %183, 1
store i32 %184, i32* %9
br label %63
185: ; preds = %72
%186 = load i32, i32* %9
store i32 %186, i32* %5
br label %187
187: ; preds = %284, %185
%188 = load i32, i32* %5
%189 = icmp sgt i32 %188, 0
br i1 %189, label %190, label %287
190: ; preds = %187
store i32 0, i32* %6
br label %191
191: ; preds = %280, %190
%192 = load i32, i32* %6
%193 = load i32, i32* %5
%194 = sub nsw i32 %193, 1
%195 = icmp slt i32 %192, %194
br i1 %195, label %196, label %283
196: ; preds = %191
%197 = load i32, i32* %6
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %198
%200 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %199, i32 0, i32 0
%201 = load i64, i64* %200
%202 = load i32, i32* %6
%203 = add nsw i32 %202, 1
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %204
%206 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %205, i32 0, i32 0
%207 = load i64, i64* %206
%208 = icmp sgt i64 %201, %207
br i1 %208, label %209, label %279
209: ; preds = %196
%210 = load i32, i32* %6
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %211
%213 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %212, i32 0, i32 0
%214 = load i64, i64* %213
store i64 %214, i64* %14
%215 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%216 = load i32, i32* %6
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %217
%219 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %218, i32 0, i32 2
%220 = getelementptr inbounds [200 x i8], [200 x i8]* %219, i64 0, i64 0
%221 = call i32 @strcpy(i8* %215, i8* %220)
%222 = load i32, i32* %6
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %223
%225 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %224, i32 0, i32 1
%226 = load i32, i32* %225
store i32 %226, i32* %7
%227 = load i32, i32* %6
%228 = add nsw i32 %227, 1
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %229
%231 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %230, i32 0, i32 0
%232 = load i64, i64* %231
%233 = load i32, i32* %6
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %234
%236 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %235, i32 0, i32 0
store i64 %232, i64* %236
%237 = load i32, i32* %6
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %238
%240 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %239, i32 0, i32 2
%241 = getelementptr inbounds [200 x i8], [200 x i8]* %240, i64 0, i64 0
%242 = load i32, i32* %6
%243 = add nsw i32 %242, 1
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %244
%246 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %245, i32 0, i32 2
%247 = getelementptr inbounds [200 x i8], [200 x i8]* %246, i64 0, i64 0
%248 = call i32 @strcpy(i8* %241, i8* %247)
%249 = load i32, i32* %6
%250 = add nsw i32 %249, 1
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %251
%253 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %252, i32 0, i32 1
%254 = load i32, i32* %253
%255 = load i32, i32* %6
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %256
%258 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %257, i32 0, i32 1
store i32 %254, i32* %258
%259 = load i64, i64* %14
%260 = load i32, i32* %6
%261 = add nsw i32 %260, 1
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %262
%264 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %263, i32 0, i32 0
store i64 %259, i64* %264
%265 = load i32, i32* %6
%266 = add nsw i32 %265, 1
%267 = sext i32 %266 to i64
%268 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %267
%269 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %268, i32 0, i32 2
%270 = getelementptr inbounds [200 x i8], [200 x i8]* %269, i64 0, i64 0
%271 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%272 = call i32 @strcpy(i8* %270, i8* %271)
%273 = load i32, i32* %7
%274 = load i32, i32* %6
%275 = add nsw i32 %274, 1
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %276
%278 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %277, i32 0, i32 1
store i32 %273, i32* %278
br label %279
279: ; preds = %209, %196
br label %280
280: ; preds = %279
%281 = load i32, i32* %6
%282 = add nsw i32 %281, 1
store i32 %282, i32* %6
br label %191
283: ; preds = %191
br label %284
284: ; preds = %283
%285 = load i32, i32* %5
%286 = add nsw i32 %285, -1
store i32 %286, i32* %5
br label %187
287: ; preds = %187
store i32 0, i32* %11
store i32 0, i32* %5
br label %288
288: ; preds = %392, %287
%289 = load i32, i32* %5
%290 = load i32, i32* %9
%291 = icmp slt i32 %289, %290
br i1 %291, label %292, label %395
292: ; preds = %288
%293 = load i32, i32* %5
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %294
%296 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %295, i32 0, i32 1
%297 = load i32, i32* %296
%298 = icmp sgt i32 %297, 1
br i1 %298, label %299, label %391
299: ; preds = %292
%300 = load i32, i32* %5
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %301
%303 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %302, i32 0, i32 0
%304 = load i64, i64* %303
store i64 %304, i64* %12
%305 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%306 = call i32 @strcpy(i8* %305, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %307
307: ; preds = %362, %299
%308 = load i32, i32* %6
%309 = load i32, i32* %9
%310 = icmp slt i32 %308, %309
br i1 %310, label %311, label %365
311: ; preds = %307
%312 = load i64, i64* %12
%313 = load i32, i32* %6
%314 = sext i32 %313 to i64
%315 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %314
%316 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %315, i32 0, i32 0
%317 = load i64, i64* %316
%318 = icmp eq i64 %312, %317
br i1 %318, label %319, label %361
319: ; preds = %311
%320 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%321 = call i64 @strlen(i8* %320)
%322 = icmp eq i64 %321, 0
br i1 %322, label %323, label %346
323: ; preds = %319
%324 = load i32, i32* %6
%325 = sext i32 %324 to i64
%326 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %325
%327 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %326, i32 0, i32 0
%328 = load i64, i64* %327
store i64 %328, i64* %13
%329 = load i64, i64* %13
%330 = icmp ne i64 %329, 0
br i1 %330, label %331, label %335
331: ; preds = %323
%332 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%333 = load i64, i64* %13
%334 = call i32 @sprintf(i8* %332, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %333)
br label %335
335: ; preds = %331, %323
%336 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%337 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%338 = call i32 @strcat(i8* %336, i8* %337)
%339 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%340 = load i32, i32* %6
%341 = sext i32 %340 to i64
%342 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %341
%343 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %342, i32 0, i32 2
%344 = getelementptr inbounds [200 x i8], [200 x i8]* %343, i64 0, i64 0
%345 = call i32 @strcat(i8* %339, i8* %344)
br label %354
346: ; preds = %319
%347 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%348 = load i32, i32* %6
%349 = sext i32 %348 to i64
%350 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %349
%351 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %350, i32 0, i32 2
%352 = getelementptr inbounds [200 x i8], [200 x i8]* %351, i64 0, i64 0
%353 = call i32 @strcat(i8* %347, i8* %352)
br label %354
354: ; preds = %346, %335
%355 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%356 = call i32 @strcat(i8* %355, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%357 = load i32, i32* %6
%358 = sext i32 %357 to i64
%359 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %2, i64 0, i64 %358
%360 = getelementptr inbounds %struct.occurance_t, %struct.occurance_t* %359, i32 0, i32 1
store i32 0, i32* %360
br label %361
361: ; preds = %354, %311
br label %362
362: ; preds = %361
%363 = load i32, i32* %6
%364 = add nsw i32 %363, 1
store i32 %364, i32* %6
br label %307
365: ; preds = %307
%366 = load i32, i32* %5
%367 = load i32, i32* %9
%368 = sub nsw i32 %367, 1
%369 = icmp ne i32 %366, %368
br i1 %369, label %370, label %382
370: ; preds = %365
%371 = load i32, i32* %11
%372 = icmp sgt i32 %371, 0
br i1 %372, label %373, label %382
373: ; preds = %370
%374 = load i32, i32* %11
%375 = icmp ne i32 %374, 1
br i1 %375, label %376, label %382
376: ; preds = %373
%377 = load i64, i64* %13
%378 = icmp ne i64 %377, 0
br i1 %378, label %379, label %381
379: ; preds = %376
%380 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %381
381: ; preds = %379, %376
br label %382
382: ; preds = %381, %373, %370, %365
%383 = load i64, i64* %13
%384 = icmp ne i64 %383, 0
br i1 %384, label %385, label %388
385: ; preds = %382
%386 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%387 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %386)
br label %388
388: ; preds = %385, %382
%389 = load i32, i32* %11
%390 = add nsw i32 %389, 1
store i32 %390, i32* %11
br label %391
391: ; preds = %388, %292
br label %392
392: ; preds = %391
%393 = load i32, i32* %5
%394 = add nsw i32 %393, 1
store i32 %394, i32* %5
br label %288
395: ; preds = %288
ret i32 0
}

LLVM IR (-O2):
%struct.occurance_t = type { i64, i32, [200 x i8] }
@.str = [1 x i8] zeroinitializer
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] zeroinitializer
@.str.3 = [5 x i8] c"%ld \00"
@.str.4 = [2 x i8] c" \00"
define i32 @main() {
%1 = alloca [3000 x %struct.occurance_t]
%2 = alloca [200 x i8]
%3 = alloca [200 x i8]
%4 = bitcast [3000 x %struct.occurance_t]* %1 to i8*
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
br label %7
7: ; preds = %0, %7
%8 = phi i64 [ 0, %0 ], [ %13, %7 ]
%9 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %8, i32 1
store i32 0, i32* %9
%10 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %8, i32 0
store i64 0, i64* %10
%11 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %8, i32 2, i64 0
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, 3000
br i1 %14, label %15, label %7
15: ; preds = %7
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%17 = call signext i8 (...) @getchar()
%18 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 0, i32 1
store i32 1, i32* %18
%19 = call i8* @hash(i8* %5)
%20 = ptrtoint i8* %19 to i64
%21 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 0, i32 0
store i64 %20, i64* %21
%22 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 0, i32 2, i64 0
%23 = call i32 @strcpy(i8* %22, i8* %5)
%24 = icmp eq i8 %17, 10
br i1 %24, label %27, label %31
25: ; preds = %110
%26 = trunc i64 %111 to i32
br label %27
27: ; preds = %25, %15
%28 = phi i32 [ 1, %15 ], [ %26, %25 ]
%29 = add i32 %28, -1
%30 = zext i32 %29 to i64
br label %119
31: ; preds = %15, %110
%32 = phi i64 [ %116, %110 ], [ 0, %15 ]
%33 = phi i64 [ %111, %110 ], [ 1, %15 ]
%34 = phi i64 [ %115, %110 ], [ 2, %15 ]
%35 = add i64 %32, 1
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%37 = call signext i8 (...) @getchar()
%38 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %33, i32 1
store i32 1, i32* %38
%39 = call i8* @hash(i8* %5)
%40 = ptrtoint i8* %39 to i64
%41 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %33, i32 0
store i64 %40, i64* %41
%42 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %33, i32 2, i64 0
%43 = call i32 @strcpy(i8* %42, i8* %5)
%44 = and i64 %34, 3
%45 = icmp ult i64 %35, 3
br i1 %45, label %61, label %46
46: ; preds = %31
%47 = and i64 %34, -4
br label %48
48: ; preds = %48, %46
%49 = phi i64 [ 0, %46 ], [ %58, %48 ]
%50 = phi i64 [ 0, %46 ], [ %59, %48 ]
%51 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %49, i32 1
store i32 1, i32* %51
%52 = or i64 %49, 1
%53 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %52, i32 1
store i32 1, i32* %53
%54 = or i64 %49, 2
%55 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %54, i32 1
store i32 1, i32* %55
%56 = or i64 %49, 3
%57 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %56, i32 1
store i32 1, i32* %57
%58 = add nuw nsw i64 %49, 4
%59 = add i64 %50, 4
%60 = icmp eq i64 %59, %47
br i1 %60, label %61, label %48
61: ; preds = %48, %31
%62 = phi i64 [ 0, %31 ], [ %58, %48 ]
%63 = icmp eq i64 %44, 0
br i1 %63, label %71, label %64
64: ; preds = %61, %64
%65 = phi i64 [ %68, %64 ], [ %62, %61 ]
%66 = phi i64 [ %69, %64 ], [ 0, %61 ]
%67 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %65, i32 1
store i32 1, i32* %67
%68 = add nuw nsw i64 %65, 1
%69 = add i64 %66, 1
%70 = icmp eq i64 %69, %44
br i1 %70, label %71, label %64
71: ; preds = %64, %61
br label %76
72: ; preds = %106, %76
%73 = phi i32 [ %79, %76 ], [ %107, %106 ]
%74 = add nuw nsw i64 %78, 1
%75 = icmp eq i64 %82, %34
br i1 %75, label %110, label %76
76: ; preds = %71, %72
%77 = phi i64 [ %82, %72 ], [ 0, %71 ]
%78 = phi i64 [ %74, %72 ], [ 1, %71 ]
%79 = phi i32 [ %73, %72 ], [ 0, %71 ]
%80 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %77, i32 0
%81 = load i64, i64* %80
%82 = add nuw nsw i64 %77, 1
%83 = icmp ult i64 %77, %33
br i1 %83, label %84, label %72
84: ; preds = %76
%85 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %77, i32 2, i64 0
%86 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %77, i32 1
br label %87
87: ; preds = %84, %106
%88 = phi i64 [ %78, %84 ], [ %108, %106 ]
%89 = phi i32 [ %79, %84 ], [ %107, %106 ]
%90 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %88, i32 0
%91 = load i64, i64* %90
%92 = icmp eq i64 %91, %81
br i1 %92, label %93, label %106
93: ; preds = %87
%94 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %88, i32 2, i64 0
%95 = call i32 @strcmp(i8* %85, i8* %94)
%96 = icmp eq i32 %95, 0
br i1 %96, label %105, label %97
97: ; preds = %93
%98 = load i32, i32* %86
%99 = add nsw i32 %98, 1
store i32 %99, i32* %86
%100 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %88, i32 1
%101 = load i32, i32* %100
%102 = add nsw i32 %101, 1
store i32 %102, i32* %100
%103 = icmp sgt i32 %101, 2
%104 = select i1 %103, i32 1, i32 %89
br label %106
105: ; preds = %93
store i64 0, i64* %90
br label %106
106: ; preds = %97, %87, %105
%107 = phi i32 [ %89, %105 ], [ %89, %87 ], [ %104, %97 ]
%108 = add nuw nsw i64 %88, 1
%109 = icmp eq i64 %108, %34
br i1 %109, label %72, label %87
110: ; preds = %72
%111 = add nuw i64 %33, 1
%112 = icmp ne i8 %37, 10
%113 = icmp eq i32 %73, 0
%114 = select i1 %112, i1 %113, i1 false
%115 = add nuw i64 %34, 1
%116 = add i64 %32, 1
br i1 %114, label %31, label %25
117: ; preds = %146
%118 = add nsw i64 %120, -1
br i1 %123, label %119, label %124
119: ; preds = %27, %117
%120 = phi i64 [ %30, %27 ], [ %118, %117 ]
%121 = phi i32 [ %28, %27 ], [ %122, %117 ]
%122 = add nsw i32 %121, -1
%123 = icmp sgt i32 %121, 1
br i1 %123, label %127, label %124
124: ; preds = %119, %117
%125 = call i32 @llvm.umax.i32(i32 %28, i32 1)
%126 = zext i32 %125 to i64
br label %148
127: ; preds = %119, %146
%128 = phi i64 [ %131, %146 ], [ 0, %119 ]
%129 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %128, i32 0
%130 = load i64, i64* %129
%131 = add nuw nsw i64 %128, 1
%132 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %131, i32 0
%133 = load i64, i64* %132
%134 = icmp sgt i64 %130, %133
br i1 %134, label %135, label %146
135: ; preds = %127
%136 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %128, i32 2, i64 0
%137 = call i32 @strcpy(i8* %6, i8* %136)
%138 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %128, i32 1
%139 = load i32, i32* %138
%140 = load i64, i64* %132
store i64 %140, i64* %129
%141 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %131, i32 2, i64 0
%142 = call i32 @strcpy(i8* %136, i8* %141)
%143 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %131, i32 1
%144 = load i32, i32* %143
store i32 %144, i32* %138
store i64 %130, i64* %132
%145 = call i32 @strcpy(i8* %141, i8* %6)
store i32 %139, i32* %143
br label %146
146: ; preds = %127, %135
%147 = icmp eq i64 %131, %120
br i1 %147, label %117, label %127
148: ; preds = %124, %199
%149 = phi i64 [ 0, %124 ], [ %202, %199 ]
%150 = phi i64 [ undef, %124 ], [ %201, %199 ]
%151 = phi i32 [ 0, %124 ], [ %200, %199 ]
%152 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %149, i32 1
%153 = load i32, i32* %152
%154 = icmp sgt i32 %153, 1
br i1 %154, label %155, label %199
155: ; preds = %148
%156 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %149, i32 0
%157 = load i64, i64* %156
%158 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%159 = icmp eq i64 %157, 0
br label %160
160: ; preds = %155, %180
%161 = phi i64 [ 0, %155 ], [ %182, %180 ]
%162 = phi i64 [ %150, %155 ], [ %181, %180 ]
%163 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %161, i32 0
%164 = load i64, i64* %163
%165 = icmp eq i64 %157, %164
br i1 %165, label %166, label %180
166: ; preds = %160
%167 = load i8, i8* %6
%168 = icmp eq i8 %167, 0
br i1 %168, label %169, label %174
169: ; preds = %166
br i1 %159, label %172, label %170
170: ; preds = %169
%171 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %157)
br label %172
172: ; preds = %170, %169
%173 = call i32 @strcat(i8* %6, i8* %5)
br label %174
174: ; preds = %166, %172
%175 = phi i64 [ %157, %172 ], [ %162, %166 ]
%176 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %161, i32 2, i64 0
%177 = call i32 @strcat(i8* %6, i8* %176)
%178 = call i32 @strcat(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%179 = getelementptr inbounds [3000 x %struct.occurance_t], [3000 x %struct.occurance_t]* %1, i64 0, i64 %161, i32 1
store i32 0, i32* %179
br label %180
180: ; preds = %160, %174
%181 = phi i64 [ %175, %174 ], [ %162, %160 ]
%182 = add nuw nsw i64 %161, 1
%183 = icmp eq i64 %182, %126
br i1 %183, label %184, label %160
184: ; preds = %180
%185 = icmp ne i64 %149, %30
%186 = icmp sgt i32 %151, 0
%187 = select i1 %185, i1 %186, i1 false
%188 = icmp ne i32 %151, 1
%189 = select i1 %187, i1 %188, i1 false
%190 = icmp ne i64 %181, 0
%191 = select i1 %189, i1 %190, i1 false
br i1 %191, label %192, label %194
192: ; preds = %184
%193 = call i32 @putchar(i32 10)
br label %194
194: ; preds = %192, %184
br i1 %190, label %195, label %197
195: ; preds = %194
%196 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
br label %197
197: ; preds = %195, %194
%198 = add nsw i32 %151, 1
br label %199
199: ; preds = %148, %197
%200 = phi i32 [ %198, %197 ], [ %151, %148 ]
%201 = phi i64 [ %181, %197 ], [ %150, %148 ]
%202 = add nuw nsw i64 %149, 1
%203 = icmp eq i64 %202, %126
br i1 %203, label %204, label %148
204: ; preds = %199
ret i32 0
}