#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 /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *, int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  FILE *f_in, *f_out;
  int bus[53];
  char license[8];
  int seats;
  int i, choice, count;
  f_in = fopen("bus.txt", "r");
  if (f_in == NULL) {
    printf("To arxeio bus.txt de mporese na anagnwstei\n");
    exit(1);
  }
  fscanf(f_in, "%s %d", license, &seats);
  fclose(f_in);
  printf("%s %d\n", license, seats);
  if (seats > 53) {
    printf("megisto plitos thesewn 53\n");
    exit(1);
  }
  if (seats < 5 || (seats - 5) % 4 != 0) {
    printf("mi egkyro plithos thesewn\n");
    exit(1);
  }
  for (i = 0; i < seats; i++)
    bus[i] = 0;
  choice = 1;
  while (choice != 0) {
    printf("1. emfanish synolikoy plhthous kenwn thesewn kai twn arithmwn  "
           "tous\n");
    printf("2. krathsh theshs me sygkekrimeno arithmo\n");
    printf("3. eyresh kai krathsh theshs pou vrisketai se parathyro\n");
    printf("4. akyrwsh krathshs theshs me sygkekrimeno arithmo\n");
    printf("5. anazhthsh gia to an einai krathmenh thesh me sygkekrimeno "
           "arithmo\n");
    printf("6. emfanish listas krathmenwn thesewn taksinomhmenhs kata arithmo "
           "theshs\n");
    printf("7. emfanish ths pinakidas kykloforias kai tou diagrammatos tou "
           "lewforeiou\n");
    printf("8. apothhkefsh ths pinakidas kykloforias kai tou diagrammatos tou "
           "lewforeiou se arxeio\n");
    printf("0. termatismos\n");
    scanf("%d", &choice);
    printf("Epilogi: %d\n", choice);
    switch (choice) {
    case 1:
      count = 0;
      for (i = 0; i < seats; i++)
        if (bus[i] == 0)
          count++;
      printf("Plithos kenwn thesewn = %d apo %d\nArithmoi thesewn:\n", count,
             seats);
      for (i = 0; i < seats; i++)
        if (bus[i] == 0)
          printf("%d ", i + 1);
      printf("\n");
      break;
    case 2:
      printf("dwse arithmo thesis\n");
      scanf("%d", &i);
      if (i < 1 || i > seats)
        printf("arithmos thesis ektos oriwn\n");
      else if (bus[i - 1] == 0) {
        bus[i - 1] = 1;
        printf("thesi kratithike\n");
      } else
        printf("thesi idi kateilhmmeni\n");
      break;
    case 3:
      for (i = 0; i < seats - 2; i++)
        if (bus[i] == 0 && (i % 4 == 0 || i % 4 == 3)) {
          bus[i] = 1;
          break;
        }
      if (i < seats - 2)
        printf("kratithike i thesi %d\n", i + 1);
      else if (i == seats - 2 && bus[seats - 1] == 0) {
        bus[seats - 1] = 1;
        printf("kratithike i thesi %d\n", seats);
      } else
        printf("de brethike eleutheri thesi se parathuro\n");
      break;
    case 4:
      printf("dwse arithmo thesis\n");
      scanf("%d", &i);
      if (i < 1 || i > seats)
        printf("arithmos thesis ektos oriwn\n");
      else if (bus[i - 1] != 0) {
        bus[i - 1] = 0;
        printf("thesi apodesmeutike\n");
      } else
        printf("thesi idi eleutheri\n");
      break;
    case 5:
      printf("dwse arithmo thesis\n");
      scanf("%d", &i);
      if (i < 1 || i > seats)
        printf("arithmos thesis ektos oriwn\n");
      else if (bus[i - 1] != 0)
        printf("thesi kateilimmeni\n");
      else
        printf("thesi eleutheri\n");
      break;
    case 6:
      printf("kratimenes theseis\n");
      for (i = 0; i < seats; i++)
        if (bus[i] != 0)
          printf("%d ", i + 1);
      printf("\n");
      break;
    case 7:
      printf("%s\n", license);
      for (i = 0; i < seats; i++) {
        if (bus[i] == 0)
          printf("_");
        else
          printf("*");
        if (i % 4 == 1 && i < seats - 4)
          printf(" ");
        if (i % 4 == 3 && i < seats - 4)
          printf("\n");
      }
      printf("\n");
      break;
    case 8:
      f_out = fopen("layout.txt", "w");
      if (f_out == NULL) {
        printf("To arxeio layout.txt den mporese na anoixtei\n");
        exit(1);
      }
      fprintf(f_out, "%s\n", license);
      for (i = 0; i < seats; i++) {
        if (bus[i] == 0)
          fprintf(f_out, "_");
        else
          fprintf(f_out, "*");
        if (i % 4 == 1 && i < seats - 4)
          fprintf(f_out, " ");
        if (i % 4 == 3 && i < seats - 4)
          fprintf(f_out, "\n");
      }
      fprintf(f_out, "\n");
      fclose(f_out);
    case 0:
      break;
    default:
      printf("akatallili epilogi\n");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9b(%rip),%rdi
lea    0xe9c(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11bc <main+0x4c>
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    -0xf8(%rbp),%rdx
lea    0xe8c(%rip),%rsi
lea    -0xfc(%rbp),%rcx
call   1050 <fscanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    -0xf8(%rbp),%rsi
mov    -0xfc(%rbp),%edx
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x35,-0xfc(%rbp)
jle    1223 <main+0xb3>
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
cmpl   $0x5,-0xfc(%rbp)
jl     124a <main+0xda>
mov    -0xfc(%rbp),%eax
sub    $0x5,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1262 <main+0xf2>
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
movl   $0x0,-0x100(%rbp)
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jge    12a4 <main+0x134>
movslq -0x100(%rbp),%rax
movl   $0x0,-0xf0(%rbp,%rax,4)
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    126c <main+0xfc>
movl   $0x1,-0x104(%rbp)
cmpl   $0x0,-0x104(%rbp)
je     1ade <main+0x96e>
lea    0xddb(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x111(%rbp)
call   1040 <printf@plt>
mov    -0x111(%rbp),%al
lea    0xe06(%rip),%rdi
call   1040 <printf@plt>
mov    -0x111(%rbp),%al
lea    0xe1f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x111(%rbp),%al
lea    0xe46(%rip),%rdi
call   1040 <printf@plt>
mov    -0x111(%rbp),%al
lea    0xe68(%rip),%rdi
call   1040 <printf@plt>
mov    -0x111(%rbp),%al
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x111(%rbp),%al
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x111(%rbp),%al
lea    0xf0d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x111(%rbp),%al
lea    0xf53(%rip),%rdi
call   1040 <printf@plt>
lea    0xcf7(%rip),%rdi
lea    -0x104(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x111(%rbp),%al
mov    -0x104(%rbp),%esi
lea    0xf38(%rip),%rdi
call   1040 <printf@plt>
mov    -0x104(%rbp),%eax
mov    %rax,-0x110(%rbp)
sub    $0x8,%rax
ja     1acb <main+0x95b>
mov    -0x110(%rbp),%rax
lea    0xc51(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x108(%rbp)
movl   $0x0,-0x100(%rbp)
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jge    141b <main+0x2ab>
movslq -0x100(%rbp),%rax
cmpl   $0x0,-0xf0(%rbp,%rax,4)
jne    1402 <main+0x292>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1407 <main+0x297>
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    13cc <main+0x25c>
mov    -0x108(%rbp),%esi
mov    -0xfc(%rbp),%edx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x100(%rbp)
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jge    1496 <main+0x326>
movslq -0x100(%rbp),%rax
cmpl   $0x0,-0xf0(%rbp,%rax,4)
jne    147d <main+0x30d>
mov    -0x100(%rbp),%esi
add    $0x1,%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1482 <main+0x312>
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    143f <main+0x2cf>
lea    0xbe3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1ad9 <main+0x969>
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb9f(%rip),%rdi
lea    -0x100(%rbp),%rsi
call   1070 <scanf@plt>
cmpl   $0x1,-0x100(%rbp)
jl     14e9 <main+0x379>
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jle    14fc <main+0x38c>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1551 <main+0x3e1>
mov    -0x100(%rbp),%eax
sub    $0x1,%eax
cltq
cmpl   $0x0,-0xf0(%rbp,%rax,4)
jne    153e <main+0x3ce>
mov    -0x100(%rbp),%eax
sub    $0x1,%eax
cltq
movl   $0x1,-0xf0(%rbp,%rax,4)
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    154c <main+0x3dc>
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1551 <main+0x3e1>
jmp    1ad9 <main+0x969>
movl   $0x0,-0x100(%rbp)
mov    -0x100(%rbp),%eax
mov    -0xfc(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    15ea <main+0x47a>
movslq -0x100(%rbp),%rax
cmpl   $0x0,-0xf0(%rbp,%rax,4)
jne    15d1 <main+0x461>
mov    -0x100(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     15ba <main+0x44a>
mov    -0x100(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x3,%edx
jne    15d1 <main+0x461>
movslq -0x100(%rbp),%rax
movl   $0x1,-0xf0(%rbp,%rax,4)
jmp    15ea <main+0x47a>
jmp    15d6 <main+0x466>
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    1560 <main+0x3f0>
mov    -0x100(%rbp),%eax
mov    -0xfc(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    161d <main+0x4ad>
mov    -0x100(%rbp),%esi
add    $0x1,%esi
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    168f <main+0x51f>
mov    -0x100(%rbp),%eax
mov    -0xfc(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jne    167c <main+0x50c>
mov    -0xfc(%rbp),%eax
sub    $0x1,%eax
cltq
cmpl   $0x0,-0xf0(%rbp,%rax,4)
jne    167c <main+0x50c>
mov    -0xfc(%rbp),%eax
sub    $0x1,%eax
cltq
movl   $0x1,-0xf0(%rbp,%rax,4)
mov    -0xfc(%rbp),%esi
lea    0xcef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    168a <main+0x51a>
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    168f <main+0x51f>
jmp    1ad9 <main+0x969>
lea    0xc68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x9b4(%rip),%rdi
lea    -0x100(%rbp),%rsi
call   1070 <scanf@plt>
cmpl   $0x1,-0x100(%rbp)
jl     16d4 <main+0x564>
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jle    16e7 <main+0x577>
lea    0xc3d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    173c <main+0x5cc>
mov    -0x100(%rbp),%eax
sub    $0x1,%eax
cltq
cmpl   $0x0,-0xf0(%rbp,%rax,4)
je     1729 <main+0x5b9>
mov    -0x100(%rbp),%eax
sub    $0x1,%eax
cltq
movl   $0x0,-0xf0(%rbp,%rax,4)
lea    0xc83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1737 <main+0x5c7>
lea    0xc85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    173c <main+0x5cc>
jmp    1ad9 <main+0x969>
lea    0xbbb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x907(%rip),%rdi
lea    -0x100(%rbp),%rsi
call   1070 <scanf@plt>
cmpl   $0x1,-0x100(%rbp)
jl     1781 <main+0x611>
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jle    1794 <main+0x624>
lea    0xb90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    17d3 <main+0x663>
mov    -0x100(%rbp),%eax
sub    $0x1,%eax
cltq
cmpl   $0x0,-0xf0(%rbp,%rax,4)
je     17c0 <main+0x650>
lea    0xc16(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    17ce <main+0x65e>
lea    0xc17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    17d3 <main+0x663>
jmp    1ad9 <main+0x969>
lea    0xc10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x100(%rbp)
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jge    1847 <main+0x6d7>
movslq -0x100(%rbp),%rax
cmpl   $0x0,-0xf0(%rbp,%rax,4)
je     182e <main+0x6be>
mov    -0x100(%rbp),%esi
add    $0x1,%esi
lea    0xad8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1833 <main+0x6c3>
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    17f0 <main+0x680>
lea    0x832(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1ad9 <main+0x969>
lea    -0xf8(%rbp),%rsi
lea    0xb9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x100(%rbp)
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jge    1952 <main+0x7e2>
movslq -0x100(%rbp),%rax
cmpl   $0x0,-0xf0(%rbp,%rax,4)
jne    18b3 <main+0x743>
lea    0xb60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    18c1 <main+0x751>
lea    0xb4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x100(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    18fd <main+0x78d>
mov    -0x100(%rbp),%eax
mov    -0xfc(%rbp),%ecx
sub    $0x4,%ecx
cmp    %ecx,%eax
jge    18fd <main+0x78d>
lea    0xa0b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x100(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x3,%edx
jne    1939 <main+0x7c9>
mov    -0x100(%rbp),%eax
mov    -0xfc(%rbp),%ecx
sub    $0x4,%ecx
cmp    %ecx,%eax
jge    1939 <main+0x7c9>
lea    0x74e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    193e <main+0x7ce>
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    1879 <main+0x709>
lea    0x727(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1ad9 <main+0x969>
lea    0xa9f(%rip),%rdi
lea    0xaa3(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    199f <main+0x82f>
lea    0xa8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x18(%rbp),%rdi
lea    -0xf8(%rbp),%rdx
lea    0xa52(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x100(%rbp)
mov    -0x100(%rbp),%eax
cmp    -0xfc(%rbp),%eax
jge    1aab <main+0x93b>
movslq -0x100(%rbp),%rax
cmpl   $0x0,-0xf0(%rbp,%rax,4)
jne    1a00 <main+0x890>
mov    -0x18(%rbp),%rdi
lea    0xa13(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1a12 <main+0x8a2>
mov    -0x18(%rbp),%rdi
lea    0x9fe(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x100(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1a52 <main+0x8e2>
mov    -0x100(%rbp),%eax
mov    -0xfc(%rbp),%ecx
sub    $0x4,%ecx
cmp    %ecx,%eax
jge    1a52 <main+0x8e2>
mov    -0x18(%rbp),%rdi
lea    0x8b6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x100(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x3,%edx
jne    1a92 <main+0x922>
mov    -0x100(%rbp),%eax
mov    -0xfc(%rbp),%ecx
sub    $0x4,%ecx
cmp    %ecx,%eax
jge    1a92 <main+0x922>
mov    -0x18(%rbp),%rdi
lea    0x5f5(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    1a97 <main+0x927>
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    19c2 <main+0x852>
mov    -0x18(%rbp),%rdi
lea    0x5ca(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
jmp    1ad9 <main+0x969>
lea    0x974(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12ae <main+0x13e>
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
lea    0xe5c(%rip),%rdi
lea    0xe5d(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     18d3 <main+0x723>
mov    %rax,%rbx
lea    0xe47(%rip),%rsi
lea    0x18(%rsp),%rbp
lea    0x10(%rsp),%rcx
mov    %rax,%rdi
mov    %rbp,%rdx
call   1080 <fscanf@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%edx
lea    0xe25(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%rsp),%ebx
cmp    $0x36,%ebx
jge    18dc <main+0x72c>
cmp    $0x5,%ebx
jl     18ca <main+0x71a>
lea    -0x1(%rbx),%eax
test   $0x3,%al
jne    18ca <main+0x71a>
lea    0x0(,%rbx,4),%rdx
lea    0x20(%rsp),%rdi
xor    %esi,%esi
call   1070 <memset@plt>
mov    %ebx,0xc(%rsp)
movl   $0x1,0x14(%rsp)
lea    0xe8c(%rip),%r15
lea    0xeaf(%rip),%r13
lea    0xee0(%rip),%r14
lea    0xf0c(%rip),%r12
lea    0xf4a(%rip),%rbp
lea    0xf8c(%rip),%rbx
jmp    129d <main+0xed>
lea    0x1123(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x14(%rsp)
je     18ad <main+0x6fd>
lea    0xe05(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xf7a(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc5(%rip),%rdi
call   1040 <puts@plt>
lea    0xd39(%rip),%rdi
lea    0x14(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0x14(%rsp),%esi
lea    0xd2e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x14(%rsp),%eax
cmp    $0x8,%rax
ja     134c <main+0x19c>
lea    0xcdb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x10(%rsp),%edx
test   %edx,%edx
jle    16f3 <main+0x543>
cmp    $0x8,%edx
jae    16fc <main+0x54c>
xor    %eax,%eax
xor    %esi,%esi
jmp    17c0 <main+0x610>
lea    0x1079(%rip),%rdi
jmp    128d <main+0xdd>
lea    0x1015(%rip),%rdi
call   1040 <puts@plt>
lea    0xcc6(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1286 <main+0xd6>
cmp    0x10(%rsp),%eax
jg     1286 <main+0xd6>
add    $0xffffffff,%eax
cmpl   $0x0,0x20(%rsp,%rax,4)
je     1869 <main+0x6b9>
lea    0xfe8(%rip),%rdi
jmp    128d <main+0xdd>
movslq 0x10(%rsp),%rsi
lea    -0x2(%rsi),%ecx
cmp    $0x3,%rsi
jl     16d0 <main+0x520>
lea    -0x2(%rsi),%eax
mov    %ecx,%edx
xor    %ecx,%ecx
jmp    13cd <main+0x21d>
add    $0x1,%rcx
cmp    %rcx,%rdx
je     183f <main+0x68f>
cmpl   $0x0,0x20(%rsp,%rcx,4)
jne    13c0 <main+0x210>
mov    %ecx,%edi
and    $0x3,%edi
je     13e0 <main+0x230>
cmp    $0x3,%edi
jne    13c0 <main+0x210>
mov    %ecx,0xc(%rsp)
movl   $0x1,0x20(%rsp,%rcx,4)
lea    0x1(%rcx),%esi
lea    0xc8b(%rip),%rdi
jmp    185d <main+0x6ad>
lea    0xf72(%rip),%rdi
call   1040 <puts@plt>
lea    0xc23(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1286 <main+0xd6>
cmp    0x10(%rsp),%eax
jg     1286 <main+0xd6>
add    $0xffffffff,%eax
cmpl   $0x0,0x20(%rsp,%rax,4)
je     187d <main+0x6cd>
movl   $0x0,0x20(%rsp,%rax,4)
lea    0xeec(%rip),%rdi
jmp    128d <main+0xdd>
lea    0xf1d(%rip),%rdi
call   1040 <puts@plt>
lea    0xbce(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1286 <main+0xd6>
cmp    0x10(%rsp),%eax
jg     1286 <main+0xd6>
add    $0xffffffff,%eax
cmpl   $0x0,0x20(%rsp,%rax,4)
je     1889 <main+0x6d9>
lea    0xe78(%rip),%rdi
jmp    128d <main+0xdd>
lea    0xe49(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,0xc(%rsp)
mov    0x10(%rsp),%eax
test   %eax,%eax
jle    1830 <main+0x680>
xor    %esi,%esi
jmp    14df <main+0x32f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%esi
mov    %esi,0xc(%rsp)
cmp    %eax,%esi
jge    1830 <main+0x680>
movslq %esi,%rcx
cmpl   $0x0,0x20(%rsp,%rcx,4)
je     14d0 <main+0x320>
add    $0x1,%esi
lea    0xb8a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%eax
jmp    14d0 <main+0x320>
lea    0x18(%rsp),%rdi
call   1040 <puts@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x10(%rsp)
jle    1830 <main+0x680>
xor    %eax,%eax
jmp    1541 <main+0x391>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x10(%rsp),%eax
jge    1830 <main+0x680>
cltq
cmpl   $0x0,0x20(%rsp,%rax,4)
mov    $0x5f,%edi
je     1554 <main+0x3a4>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x1,%edx
jne    158a <main+0x3da>
mov    0x10(%rsp),%ecx
add    $0xfffffffc,%ecx
cmp    %ecx,%eax
jge    158a <main+0x3da>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x3,%edx
jne    1530 <main+0x380>
mov    0x10(%rsp),%ecx
add    $0xfffffffc,%ecx
cmp    %ecx,%eax
jge    1530 <main+0x380>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
jmp    1530 <main+0x380>
mov    %r15,%rbp
lea    0xad6(%rip),%rdi
lea    0xada(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     18c1 <main+0x711>
mov    %rax,%r15
mov    %rax,%rdi
lea    0xab0(%rip),%rsi
lea    0x18(%rsp),%rdx
xor    %eax,%eax
call   10a0 <fprintf@plt>
movl   $0x0,0xc(%rsp)
cmpl   $0x0,0x10(%rsp)
jle    16a5 <main+0x4f5>
xor    %eax,%eax
jmp    1621 <main+0x471>
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    0x10(%rsp),%eax
jge    16a5 <main+0x4f5>
cltq
cmpl   $0x0,0x20(%rsp,%rax,4)
mov    $0x5f,%edi
je     1634 <main+0x484>
mov    $0x2a,%edi
mov    %r15,%rsi
call   1090 <fputc@plt>
mov    0xc(%rsp),%eax
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x1,%edx
jne    1670 <main+0x4c0>
mov    0x10(%rsp),%ecx
add    $0xfffffffc,%ecx
cmp    %ecx,%eax
jge    1670 <main+0x4c0>
mov    $0x20,%edi
mov    %r15,%rsi
call   1090 <fputc@plt>
mov    0xc(%rsp),%eax
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x3,%edx
jne    1610 <main+0x460>
mov    0x10(%rsp),%ecx
add    $0xfffffffc,%ecx
cmp    %ecx,%eax
jge    1610 <main+0x460>
mov    $0xa,%edi
mov    %r15,%rsi
call   1090 <fputc@plt>
mov    0xc(%rsp),%eax
jmp    1610 <main+0x460>
mov    $0xa,%edi
mov    %r15,%rsi
call   1090 <fputc@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    %rbp,%r15
lea    0xb03(%rip),%rbp
lea    0xb45(%rip),%rbx
jmp    1292 <main+0xe2>
movl   $0x0,0xc(%rsp)
test   %ecx,%ecx
jne    16e7 <main+0x537>
cmpl   $0x0,0x1c(%rsp,%rsi,4)
je     184e <main+0x69e>
lea    0xc5d(%rip),%rdi
jmp    128d <main+0xdd>
xor    %ecx,%ecx
xor    %esi,%esi
jmp    17d3 <main+0x623>
mov    %edx,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rsi
mov    %rsi,%rcx
shr    $0x3,%rcx
add    $0x1,%rcx
test   %rsi,%rsi
pxor   %xmm3,%xmm3
je     1895 <main+0x6e5>
mov    %rcx,%rdi
and    $0xfffffffffffffffe,%rdi
pxor   %xmm0,%xmm0
xor    %esi,%esi
pxor   %xmm1,%xmm1
xchg   %ax,%ax
movdqa 0x20(%rsp,%rsi,4),%xmm2
pcmpeqd %xmm3,%xmm2
psubd  %xmm2,%xmm0
movdqa 0x30(%rsp,%rsi,4),%xmm2
pcmpeqd %xmm3,%xmm2
psubd  %xmm2,%xmm1
movdqa 0x40(%rsp,%rsi,4),%xmm2
pcmpeqd %xmm3,%xmm2
psubd  %xmm2,%xmm0
movdqa 0x50(%rsp,%rsi,4),%xmm2
pcmpeqd %xmm3,%xmm2
psubd  %xmm2,%xmm1
add    $0x10,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1730 <main+0x580>
test   $0x1,%cl
je     1793 <main+0x5e3>
movdqa 0x20(%rsp,%rsi,4),%xmm2
pcmpeqd %xmm3,%xmm2
psubd  %xmm2,%xmm0
movdqa 0x30(%rsp,%rsi,4),%xmm2
pcmpeqd %xmm3,%xmm2
psubd  %xmm2,%xmm1
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%esi
mov    %edx,%ecx
cmp    %rdx,%rax
je     17d3 <main+0x623>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpl   $0x1,0x20(%rsp,%rax,4)
adc    $0x0,%esi
add    $0x1,%rax
cmp    %rax,%rdx
jne    17c0 <main+0x610>
mov    %edx,%ecx
mov    %ecx,0xc(%rsp)
lea    0x86a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0xc(%rsp)
mov    0x10(%rsp),%eax
test   %eax,%eax
jle    1830 <main+0x680>
xor    %esi,%esi
jmp    180b <main+0x65b>
nopl   0x0(%rax)
add    $0x1,%esi
mov    %esi,0xc(%rsp)
cmp    %eax,%esi
jge    1830 <main+0x680>
movslq %esi,%rcx
cmpl   $0x0,0x20(%rsp,%rcx,4)
jne    1800 <main+0x650>
add    $0x1,%esi
lea    0x85e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%eax
jmp    1800 <main+0x650>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1292 <main+0xe2>
mov    %eax,0xc(%rsp)
cmpl   $0x0,0x1c(%rsp,%rsi,4)
jne    16e7 <main+0x537>
movl   $0x1,0x1c(%rsp,%rsi,4)
lea    0x824(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1292 <main+0xe2>
movl   $0x1,0x20(%rsp,%rax,4)
lea    0xb27(%rip),%rdi
jmp    128d <main+0xdd>
lea    0xa9f(%rip),%rdi
jmp    128d <main+0xdd>
lea    0xa70(%rip),%rdi
jmp    128d <main+0xdd>
pxor   %xmm0,%xmm0
xor    %esi,%esi
pxor   %xmm1,%xmm1
test   $0x1,%cl
jne    1777 <main+0x5c7>
jmp    1793 <main+0x5e3>
xor    %eax,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x9f8(%rip),%rdi
jmp    18e3 <main+0x733>
lea    0xb0e(%rip),%rdi
jmp    18e3 <main+0x733>
lea    0xb39(%rip),%rdi
jmp    18e3 <main+0x733>
lea    0xb16(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"bus.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [44 x i8] c"To arxeio bus.txt de mporese na anagnwstei\0A\00"
@.str.3 = [6 x i8] c"%s %d\00"
@.str.4 = [7 x i8] c"%s %d\0A\00"
@.str.5 = [27 x i8] c"megisto plitos thesewn 53\0A\00"
@.str.6 = [27 x i8] c"mi egkyro plithos thesewn\0A\00"
@.str.7 = [69 x i8] c"1. emfanish synolikoy plhthous kenwn thesewn kai twn arithmwn tous\0A\00"
@.str.8 = [43 x i8] c"2. krathsh theshs me sygkekrimeno arithmo\0A\00"
@.str.9 = [57 x i8] c"3. eyresh kai krathsh theshs pou vrisketai se parathyro\0A\00"
@.str.10 = [52 x i8] c"4. akyrwsh krathshs theshs me sygkekrimeno arithmo\0A\00"
@.str.11 = [70 x i8] c"5. anazhthsh gia to an einai krathmenh thesh me sygkekrimeno arithmo\0A\00"
@.str.12 = [74 x i8] c"6. emfanish listas krathmenwn thesewn taksinomhmenhs kata arithmo theshs\0A\00"
@.str.13 = [75 x i8] c"7. emfanish ths pinakidas kykloforias kai tou diagrammatos tou lewforeiou\0A\00"
@.str.14 = [88 x i8] c"8. apothhkefsh ths pinakidas kykloforias kai tou diagrammatos tou lewforeiou se arxeio\0A\00"
@.str.15 = [16 x i8] c"0. termatismos\0A\00"
@.str.16 = [3 x i8] c"%d\00"
@.str.17 = [13 x i8] c"Epilogi: %d\0A\00"
@.str.18 = [53 x i8] c"Plithos kenwn thesewn = %d apo %d\0AArithmoi thesewn:\0A\00"
@.str.19 = [4 x i8] c"%d \00"
@.str.20 = [2 x i8] c"\0A\00"
@.str.21 = [21 x i8] c"dwse arithmo thesis\0A\00"
@.str.22 = [29 x i8] c"arithmos thesis ektos oriwn\0A\00"
@.str.23 = [18 x i8] c"thesi kratithike\0A\00"
@.str.24 = [24 x i8] c"thesi idi kateilhmmeni\0A\00"
@.str.25 = [23 x i8] c"kratithike i thesi %d\0A\00"
@.str.26 = [42 x i8] c"de brethike eleutheri thesi se parathuro\0A\00"
@.str.27 = [21 x i8] c"thesi apodesmeutike\0A\00"
@.str.28 = [21 x i8] c"thesi idi eleutheri\0A\00"
@.str.29 = [20 x i8] c"thesi kateilimmeni\0A\00"
@.str.30 = [17 x i8] c"thesi eleutheri\0A\00"
@.str.31 = [20 x i8] c"kratimenes theseis\0A\00"
@.str.32 = [4 x i8] c"%s\0A\00"
@.str.33 = [2 x i8] c"_\00"
@.str.34 = [2 x i8] c"*\00"
@.str.35 = [2 x i8] c" \00"
@.str.36 = [11 x i8] c"layout.txt\00"
@.str.37 = [2 x i8] c"w\00"
@.str.38 = [46 x i8] c"To arxeio layout.txt den mporese na anoixtei\0A\00"
@.str.39 = [20 x i8] c"akatallili epilogi\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca [53 x i32]
%5 = alloca [8 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %2
%11 = load i32*, i32** %2
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %0
%17 = load i32*, i32** %2
%18 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%19 = call i32 @fscanf(i32* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %18, i32* %6)
%20 = load i32*, i32** %2
%21 = call i32 @fclose(i32* %20)
%22 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%23 = load i32, i32* %6
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %22, i32 %23)
%25 = load i32, i32* %6
%26 = icmp sgt i32 %25, 53
br i1 %26, label %27, label %30
27: ; preds = %16
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%29 = call i32 @exit(i32 1)
unreachable
30: ; preds = %16
%31 = load i32, i32* %6
%32 = icmp slt i32 %31, 5
br i1 %32, label %38, label %33
33: ; preds = %30
%34 = load i32, i32* %6
%35 = sub nsw i32 %34, 5
%36 = srem i32 %35, 4
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %33, %30
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%40 = call i32 @exit(i32 1)
unreachable
41: ; preds = %33
store i32 0, i32* %7
br label %42
42: ; preds = %50, %41
%43 = load i32, i32* %7
%44 = load i32, i32* %6
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %53
46: ; preds = %42
%47 = load i32, i32* %7
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %48
store i32 0, i32* %49
br label %50
50: ; preds = %46
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
store i32 %52, i32* %7
br label %42
53: ; preds = %42
store i32 1, i32* %8
br label %54
54: ; preds = %383, %53
%55 = load i32, i32* %8
%56 = icmp ne i32 %55, 0
br i1 %56, label %57, label %384
57: ; preds = %54
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0))
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0))
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.9, i64 0, i64 0))
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0))
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.11, i64 0, i64 0))
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.12, i64 0, i64 0))
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.13, i64 0, i64 0))
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.14, i64 0, i64 0))
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
%67 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %8)
%68 = load i32, i32* %8
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 %68)
%70 = load i32, i32* %8
switch i32 %70, label %381 [
i32 1, label %71
i32 2, label %113
i32 3, label %141
i32 4, label %201
i32 5, label %229
i32 6, label %253
i32 7, label %275
i32 8, label %320
i32 0, label %380
]
71: ; preds = %57
store i32 0, i32* %9
store i32 0, i32* %7
br label %72
72: ; preds = %86, %71
%73 = load i32, i32* %7
%74 = load i32, i32* %6
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %89
76: ; preds = %72
%77 = load i32, i32* %7
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %78
%80 = load i32, i32* %79
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %85
82: ; preds = %76
%83 = load i32, i32* %9
%84 = add nsw i32 %83, 1
store i32 %84, i32* %9
br label %85
85: ; preds = %82, %76
br label %86
86: ; preds = %85
%87 = load i32, i32* %7
%88 = add nsw i32 %87, 1
store i32 %88, i32* %7
br label %72
89: ; preds = %72
%90 = load i32, i32* %9
%91 = load i32, i32* %6
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.18, i64 0, i64 0), i32 %90, i32 %91)
store i32 0, i32* %7
br label %93
93: ; preds = %108, %89
%94 = load i32, i32* %7
%95 = load i32, i32* %6
%96 = icmp slt i32 %94, %95
br i1 %96, label %97, label %111
97: ; preds = %93
%98 = load i32, i32* %7
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %99
%101 = load i32, i32* %100
%102 = icmp eq i32 %101, 0
br i1 %102, label %103, label %107
103: ; preds = %97
%104 = load i32, i32* %7
%105 = add nsw i32 %104, 1
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %105)
br label %107
107: ; preds = %103, %97
br label %108
108: ; preds = %107
%109 = load i32, i32* %7
%110 = add nsw i32 %109, 1
store i32 %110, i32* %7
br label %93
111: ; preds = %93
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %383
113: ; preds = %57
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
%115 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %7)
%116 = load i32, i32* %7
%117 = icmp slt i32 %116, 1
br i1 %117, label %122, label %118
118: ; preds = %113
%119 = load i32, i32* %7
%120 = load i32, i32* %6
%121 = icmp sgt i32 %119, %120
br i1 %121, label %122, label %124
122: ; preds = %118, %113
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0))
br label %140
124: ; preds = %118
%125 = load i32, i32* %7
%126 = sub nsw i32 %125, 1
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %127
%129 = load i32, i32* %128
%130 = icmp eq i32 %129, 0
br i1 %130, label %131, label %137
131: ; preds = %124
%132 = load i32, i32* %7
%133 = sub nsw i32 %132, 1
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %134
store i32 1, i32* %135
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.23, i64 0, i64 0))
br label %139
137: ; preds = %124
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0))
br label %139
139: ; preds = %137, %131
br label %140
140: ; preds = %139, %122
br label %383
141: ; preds = %57
store i32 0, i32* %7
br label %142
142: ; preds = %166, %141
%143 = load i32, i32* %7
%144 = load i32, i32* %6
%145 = sub nsw i32 %144, 2
%146 = icmp slt i32 %143, %145
br i1 %146, label %147, label %169
147: ; preds = %142
%148 = load i32, i32* %7
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %149
%151 = load i32, i32* %150
%152 = icmp eq i32 %151, 0
br i1 %152, label %153, label %165
153: ; preds = %147
%154 = load i32, i32* %7
%155 = srem i32 %154, 4
%156 = icmp eq i32 %155, 0
br i1 %156, label %161, label %157
157: ; preds = %153
%158 = load i32, i32* %7
%159 = srem i32 %158, 4
%160 = icmp eq i32 %159, 3
br i1 %160, label %161, label %165
161: ; preds = %157, %153
%162 = load i32, i32* %7
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %163
store i32 1, i32* %164
br label %169
165: ; preds = %157, %147
br label %166
166: ; preds = %165
%167 = load i32, i32* %7
%168 = add nsw i32 %167, 1
store i32 %168, i32* %7
br label %142
169: ; preds = %161, %142
%170 = load i32, i32* %7
%171 = load i32, i32* %6
%172 = sub nsw i32 %171, 2
%173 = icmp slt i32 %170, %172
br i1 %173, label %174, label %178
174: ; preds = %169
%175 = load i32, i32* %7
%176 = add nsw i32 %175, 1
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0), i32 %176)
br label %200
178: ; preds = %169
%179 = load i32, i32* %7
%180 = load i32, i32* %6
%181 = sub nsw i32 %180, 2
%182 = icmp eq i32 %179, %181
br i1 %182, label %183, label %197
183: ; preds = %178
%184 = load i32, i32* %6
%185 = sub nsw i32 %184, 1
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %186
%188 = load i32, i32* %187
%189 = icmp eq i32 %188, 0
br i1 %189, label %190, label %197
190: ; preds = %183
%191 = load i32, i32* %6
%192 = sub nsw i32 %191, 1
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %193
store i32 1, i32* %194
%195 = load i32, i32* %6
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0), i32 %195)
br label %199
197: ; preds = %183, %178
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.26, i64 0, i64 0))
br label %199
199: ; preds = %197, %190
br label %200
200: ; preds = %199, %174
br label %383
201: ; preds = %57
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
%203 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %7)
%204 = load i32, i32* %7
%205 = icmp slt i32 %204, 1
br i1 %205, label %210, label %206
206: ; preds = %201
%207 = load i32, i32* %7
%208 = load i32, i32* %6
%209 = icmp sgt i32 %207, %208
br i1 %209, label %210, label %212
210: ; preds = %206, %201
%211 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0))
br label %228
212: ; preds = %206
%213 = load i32, i32* %7
%214 = sub nsw i32 %213, 1
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %215
%217 = load i32, i32* %216
%218 = icmp ne i32 %217, 0
br i1 %218, label %219, label %225
219: ; preds = %212
%220 = load i32, i32* %7
%221 = sub nsw i32 %220, 1
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %222
store i32 0, i32* %223
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.27, i64 0, i64 0))
br label %227
225: ; preds = %212
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.28, i64 0, i64 0))
br label %227
227: ; preds = %225, %219
br label %228
228: ; preds = %227, %210
br label %383
229: ; preds = %57
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
%231 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %7)
%232 = load i32, i32* %7
%233 = icmp slt i32 %232, 1
br i1 %233, label %238, label %234
234: ; preds = %229
%235 = load i32, i32* %7
%236 = load i32, i32* %6
%237 = icmp sgt i32 %235, %236
br i1 %237, label %238, label %240
238: ; preds = %234, %229
%239 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0))
br label %252
240: ; preds = %234
%241 = load i32, i32* %7
%242 = sub nsw i32 %241, 1
%243 = sext i32 %242 to i64
%244 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %243
%245 = load i32, i32* %244
%246 = icmp ne i32 %245, 0
br i1 %246, label %247, label %249
247: ; preds = %240
%248 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.29, i64 0, i64 0))
br label %251
249: ; preds = %240
%250 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.30, i64 0, i64 0))
br label %251
251: ; preds = %249, %247
br label %252
252: ; preds = %251, %238
br label %383
253: ; preds = %57
%254 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.31, i64 0, i64 0))
store i32 0, i32* %7
br label %255
255: ; preds = %270, %253
%256 = load i32, i32* %7
%257 = load i32, i32* %6
%258 = icmp slt i32 %256, %257
br i1 %258, label %259, label %273
259: ; preds = %255
%260 = load i32, i32* %7
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %261
%263 = load i32, i32* %262
%264 = icmp ne i32 %263, 0
br i1 %264, label %265, label %269
265: ; preds = %259
%266 = load i32, i32* %7
%267 = add nsw i32 %266, 1
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %267)
br label %269
269: ; preds = %265, %259
br label %270
270: ; preds = %269
%271 = load i32, i32* %7
%272 = add nsw i32 %271, 1
store i32 %272, i32* %7
br label %255
273: ; preds = %255
%274 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %383
275: ; preds = %57
%276 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%277 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i64 0, i64 0), i8* %276)
store i32 0, i32* %7
br label %278
278: ; preds = %315, %275
%279 = load i32, i32* %7
%280 = load i32, i32* %6
%281 = icmp slt i32 %279, %280
br i1 %281, label %282, label %318
282: ; preds = %278
%283 = load i32, i32* %7
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %284
%286 = load i32, i32* %285
%287 = icmp eq i32 %286, 0
br i1 %287, label %288, label %290
288: ; preds = %282
%289 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.33, i64 0, i64 0))
br label %292
290: ; preds = %282
%291 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.34, i64 0, i64 0))
br label %292
292: ; preds = %290, %288
%293 = load i32, i32* %7
%294 = srem i32 %293, 4
%295 = icmp eq i32 %294, 1
br i1 %295, label %296, label %303
296: ; preds = %292
%297 = load i32, i32* %7
%298 = load i32, i32* %6
%299 = sub nsw i32 %298, 4
%300 = icmp slt i32 %297, %299
br i1 %300, label %301, label %303
301: ; preds = %296
%302 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.35, i64 0, i64 0))
br label %303
303: ; preds = %301, %296, %292
%304 = load i32, i32* %7
%305 = srem i32 %304, 4
%306 = icmp eq i32 %305, 3
br i1 %306, label %307, label %314
307: ; preds = %303
%308 = load i32, i32* %7
%309 = load i32, i32* %6
%310 = sub nsw i32 %309, 4
%311 = icmp slt i32 %308, %310
br i1 %311, label %312, label %314
312: ; preds = %307
%313 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %314
314: ; preds = %312, %307, %303
br label %315
315: ; preds = %314
%316 = load i32, i32* %7
%317 = add nsw i32 %316, 1
store i32 %317, i32* %7
br label %278
318: ; preds = %278
%319 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %383
320: ; preds = %57
%321 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.36, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.37, i64 0, i64 0))
store i32* %321, i32** %3
%322 = load i32*, i32** %3
%323 = icmp eq i32* %322, null
br i1 %323, label %324, label %327
324: ; preds = %320
%325 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.38, i64 0, i64 0))
%326 = call i32 @exit(i32 1)
unreachable
327: ; preds = %320
%328 = load i32*, i32** %3
%329 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%330 = call i32 (i32*, i8*, ...) @fprintf(i32* %328, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i64 0, i64 0), i8* %329)
store i32 0, i32* %7
br label %331
331: ; preds = %372, %327
%332 = load i32, i32* %7
%333 = load i32, i32* %6
%334 = icmp slt i32 %332, %333
br i1 %334, label %335, label %375
335: ; preds = %331
%336 = load i32, i32* %7
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds [53 x i32], [53 x i32]* %4, i64 0, i64 %337
%339 = load i32, i32* %338
%340 = icmp eq i32 %339, 0
br i1 %340, label %341, label %344
341: ; preds = %335
%342 = load i32*, i32** %3
%343 = call i32 (i32*, i8*, ...) @fprintf(i32* %342, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.33, i64 0, i64 0))
br label %347
344: ; preds = %335
%345 = load i32*, i32** %3
%346 = call i32 (i32*, i8*, ...) @fprintf(i32* %345, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.34, i64 0, i64 0))
br label %347
347: ; preds = %344, %341
%348 = load i32, i32* %7
%349 = srem i32 %348, 4
%350 = icmp eq i32 %349, 1
br i1 %350, label %351, label %359
351: ; preds = %347
%352 = load i32, i32* %7
%353 = load i32, i32* %6
%354 = sub nsw i32 %353, 4
%355 = icmp slt i32 %352, %354
br i1 %355, label %356, label %359
356: ; preds = %351
%357 = load i32*, i32** %3
%358 = call i32 (i32*, i8*, ...) @fprintf(i32* %357, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.35, i64 0, i64 0))
br label %359
359: ; preds = %356, %351, %347
%360 = load i32, i32* %7
%361 = srem i32 %360, 4
%362 = icmp eq i32 %361, 3
br i1 %362, label %363, label %371
363: ; preds = %359
%364 = load i32, i32* %7
%365 = load i32, i32* %6
%366 = sub nsw i32 %365, 4
%367 = icmp slt i32 %364, %366
br i1 %367, label %368, label %371
368: ; preds = %363
%369 = load i32*, i32** %3
%370 = call i32 (i32*, i8*, ...) @fprintf(i32* %369, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %371
371: ; preds = %368, %363, %359
br label %372
372: ; preds = %371
%373 = load i32, i32* %7
%374 = add nsw i32 %373, 1
store i32 %374, i32* %7
br label %331
375: ; preds = %331
%376 = load i32*, i32** %3
%377 = call i32 (i32*, i8*, ...) @fprintf(i32* %376, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
%378 = load i32*, i32** %3
%379 = call i32 @fclose(i32* %378)
br label %380
380: ; preds = %57, %375
br label %383
381: ; preds = %57
%382 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.39, i64 0, i64 0))
br label %383
383: ; preds = %381, %380, %318, %273, %252, %228, %200, %140, %111
br label %54
384: ; preds = %54
%385 = load i32, i32* %1
ret i32 %385
}

LLVM IR (-O2):
@.str = [8 x i8] c"bus.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [6 x i8] c"%s %d\00"
@.str.4 = [7 x i8] c"%s %d\0A\00"
@.str.16 = [3 x i8] c"%d\00"
@.str.17 = [13 x i8] c"Epilogi: %d\0A\00"
@.str.18 = [53 x i8] c"Plithos kenwn thesewn = %d apo %d\0AArithmoi thesewn:\0A\00"
@.str.19 = [4 x i8] c"%d \00"
@.str.25 = [23 x i8] c"kratithike i thesi %d\0A\00"
@.str.32 = [4 x i8] c"%s\0A\00"
@.str.36 = [11 x i8] c"layout.txt\00"
@.str.37 = [2 x i8] c"w\00"
@str = [68 x i8] c"1. emfanish synolikoy plhthous kenwn thesewn kai twn arithmwn tous\00"
@str.40 = [42 x i8] c"2. krathsh theshs me sygkekrimeno arithmo\00"
@str.41 = [56 x i8] c"3. eyresh kai krathsh theshs pou vrisketai se parathyro\00"
@str.42 = [51 x i8] c"4. akyrwsh krathshs theshs me sygkekrimeno arithmo\00"
@str.43 = [69 x i8] c"5. anazhthsh gia to an einai krathmenh thesh me sygkekrimeno arithmo\00"
@str.44 = [73 x i8] c"6. emfanish listas krathmenwn thesewn taksinomhmenhs kata arithmo theshs\00"
@str.45 = [74 x i8] c"7. emfanish ths pinakidas kykloforias kai tou diagrammatos tou lewforeiou\00"
@str.46 = [87 x i8] c"8. apothhkefsh ths pinakidas kykloforias kai tou diagrammatos tou lewforeiou se arxeio\00"
@str.47 = [15 x i8] c"0. termatismos\00"
@str.48 = [45 x i8] c"To arxeio layout.txt den mporese na anoixtei\00"
@str.49 = [19 x i8] c"kratimenes theseis\00"
@str.51 = [16 x i8] c"thesi eleutheri\00"
@str.52 = [19 x i8] c"thesi kateilimmeni\00"
@str.55 = [20 x i8] c"thesi idi eleutheri\00"
@str.56 = [20 x i8] c"thesi apodesmeutike\00"
@str.58 = [41 x i8] c"de brethike eleutheri thesi se parathuro\00"
@str.59 = [20 x i8] c"dwse arithmo thesis\00"
@str.60 = [23 x i8] c"thesi idi kateilhmmeni\00"
@str.61 = [17 x i8] c"thesi kratithike\00"
@str.62 = [28 x i8] c"arithmos thesis ektos oriwn\00"
@str.63 = [19 x i8] c"akatallili epilogi\00"
@str.64 = [26 x i8] c"mi egkyro plithos thesewn\00"
@str.65 = [26 x i8] c"megisto plitos thesewn 53\00"
@str.66 = [43 x i8] c"To arxeio bus.txt de mporese na anagnwstei\00"
define i32 @main() {
%1 = alloca [53 x i32]
%2 = bitcast [53 x i32]* %1 to i8*
%3 = alloca [8 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.66, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %0
%17 = call i32 @fscanf(i32* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %7, i32* %4)
%18 = call i32 @fclose(i32* %11)
%19 = load i32, i32* %4
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %7, i32 %19)
%21 = load i32, i32* %4
%22 = icmp sgt i32 %21, 53
br i1 %22, label %23, label %26
23: ; preds = %16
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.65, i64 0, i64 0))
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %16
%27 = icmp slt i32 %21, 5
br i1 %27, label %32, label %28
28: ; preds = %26
%29 = add nuw nsw i32 %21, 3
%30 = and i32 %29, 3
%31 = icmp eq i32 %30, 0
br i1 %31, label %35, label %32
32: ; preds = %28, %26
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.64, i64 0, i64 0))
%34 = call i32 @exit(i32 1)
unreachable
35: ; preds = %28
%36 = zext i32 %21 to i64
%37 = shl nuw nsw i64 %36, 2
store i32 %21, i32* %5
store i32 1, i32* %6
br label %38
38: ; preds = %35, %373
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str, i64 0, i64 0))
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.40, i64 0, i64 0))
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.41, i64 0, i64 0))
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.42, i64 0, i64 0))
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.43, i64 0, i64 0))
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.44, i64 0, i64 0))
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.45, i64 0, i64 0))
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.46, i64 0, i64 0))
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.47, i64 0, i64 0))
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %6)
%49 = load i32, i32* %6
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 %49)
%51 = load i32, i32* %6
switch i32 %51, label %371 [
i32 1, label %59
i32 2, label %171
i32 3, label %52
i32 4, label %221
i32 5, label %241
i32 6, label %261
i32 7, label %284
i32 8, label %324
i32 0, label %376
]
52: ; preds = %38
%53 = load i32, i32* %4
%54 = add i32 %53, -2
%55 = icmp sgt i32 %53, 2
br i1 %55, label %56, label %209
56: ; preds = %52
%57 = add nsw i32 %53, -2
%58 = zext i32 %54 to i64
br label %191
59: ; preds = %38
%60 = load i32, i32* %4
%61 = icmp sgt i32 %60, 0
br i1 %61, label %62, label %146
62: ; preds = %59
%63 = zext i32 %60 to i64
%64 = icmp ult i32 %60, 8
br i1 %64, label %133, label %65
65: ; preds = %62
%66 = and i64 %63, 4294967288
%67 = add nsw i64 %66, -8
%68 = lshr exact i64 %67, 3
%69 = add nuw nsw i64 %68, 1
%70 = and i64 %69, 1
%71 = icmp eq i64 %67, 0
br i1 %71, label %107, label %72
72: ; preds = %65
%73 = and i64 %69, 4611686018427387902
br label %74
74: ; preds = %74, %72
%75 = phi i64 [ 0, %72 ], [ %104, %74 ]
%76 = phi <4 x i32> [ zeroinitializer, %72 ], [ %102, %74 ]
%77 = phi <4 x i32> [ zeroinitializer, %72 ], [ %103, %74 ]
%78 = phi i64 [ 0, %72 ], [ %105, %74 ]
%79 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %75
%80 = bitcast i32* %79 to <4 x i32>*
%81 = load <4 x i32>, <4 x i32>* %80
%82 = getelementptr inbounds i32, i32* %79, i64 4
%83 = bitcast i32* %82 to <4 x i32>*
%84 = load <4 x i32>, <4 x i32>* %83
%85 = icmp eq <4 x i32> %81, zeroinitializer
%86 = icmp eq <4 x i32> %84, zeroinitializer
%87 = zext <4 x i1> %85 to <4 x i32>
%88 = zext <4 x i1> %86 to <4 x i32>
%89 = add <4 x i32> %76, %87
%90 = add <4 x i32> %77, %88
%91 = or i64 %75, 8
%92 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %91
%93 = bitcast i32* %92 to <4 x i32>*
%94 = load <4 x i32>, <4 x i32>* %93
%95 = getelementptr inbounds i32, i32* %92, i64 4
%96 = bitcast i32* %95 to <4 x i32>*
%97 = load <4 x i32>, <4 x i32>* %96
%98 = icmp eq <4 x i32> %94, zeroinitializer
%99 = icmp eq <4 x i32> %97, zeroinitializer
%100 = zext <4 x i1> %98 to <4 x i32>
%101 = zext <4 x i1> %99 to <4 x i32>
%102 = add <4 x i32> %89, %100
%103 = add <4 x i32> %90, %101
%104 = add nuw i64 %75, 16
%105 = add i64 %78, 2
%106 = icmp eq i64 %105, %73
br i1 %106, label %107, label %74
107: ; preds = %74, %65
%108 = phi <4 x i32> [ undef, %65 ], [ %102, %74 ]
%109 = phi <4 x i32> [ undef, %65 ], [ %103, %74 ]
%110 = phi i64 [ 0, %65 ], [ %104, %74 ]
%111 = phi <4 x i32> [ zeroinitializer, %65 ], [ %102, %74 ]
%112 = phi <4 x i32> [ zeroinitializer, %65 ], [ %103, %74 ]
%113 = icmp eq i64 %70, 0
br i1 %113, label %127, label %114
114: ; preds = %107
%115 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %110
%116 = bitcast i32* %115 to <4 x i32>*
%117 = load <4 x i32>, <4 x i32>* %116
%118 = getelementptr inbounds i32, i32* %115, i64 4
%119 = bitcast i32* %118 to <4 x i32>*
%120 = load <4 x i32>, <4 x i32>* %119
%121 = icmp eq <4 x i32> %117, zeroinitializer
%122 = icmp eq <4 x i32> %120, zeroinitializer
%123 = zext <4 x i1> %121 to <4 x i32>
%124 = zext <4 x i1> %122 to <4 x i32>
%125 = add <4 x i32> %111, %123
%126 = add <4 x i32> %112, %124
br label %127
127: ; preds = %107, %114
%128 = phi <4 x i32> [ %108, %107 ], [ %125, %114 ]
%129 = phi <4 x i32> [ %109, %107 ], [ %126, %114 ]
%130 = add <4 x i32> %129, %128
%131 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %130)
%132 = icmp eq i64 %66, %63
br i1 %132, label %146, label %133
133: ; preds = %62, %127
%134 = phi i64 [ 0, %62 ], [ %66, %127 ]
%135 = phi i32 [ 0, %62 ], [ %131, %127 ]
br label %136
136: ; preds = %133, %136
%137 = phi i64 [ %144, %136 ], [ %134, %133 ]
%138 = phi i32 [ %143, %136 ], [ %135, %133 ]
%139 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %137
%140 = load i32, i32* %139
%141 = icmp eq i32 %140, 0
%142 = zext i1 %141 to i32
%143 = add nuw nsw i32 %138, %142
%144 = add nuw nsw i64 %137, 1
%145 = icmp eq i64 %144, %63
br i1 %145, label %146, label %136
146: ; preds = %136, %127, %59
%147 = phi i32 [ 0, %59 ], [ %60, %127 ], [ %60, %136 ]
%148 = phi i32 [ 0, %59 ], [ %131, %127 ], [ %143, %136 ]
store i32 %147, i32* %5
%149 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.18, i64 0, i64 0), i32 %148, i32 %60)
store i32 0, i32* %5
%150 = load i32, i32* %4
%151 = icmp sgt i32 %150, 0
br i1 %151, label %152, label %169
152: ; preds = %146, %164
%153 = phi i32 [ %165, %164 ], [ %150, %146 ]
%154 = phi i32 [ %167, %164 ], [ 0, %146 ]
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %155
%157 = load i32, i32* %156
%158 = icmp eq i32 %157, 0
br i1 %158, label %159, label %164
159: ; preds = %152
%160 = add nsw i32 %154, 1
%161 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %160)
%162 = load i32, i32* %5
%163 = load i32, i32* %4
br label %164
164: ; preds = %152, %159
%165 = phi i32 [ %153, %152 ], [ %163, %159 ]
%166 = phi i32 [ %154, %152 ], [ %162, %159 ]
%167 = add nsw i32 %166, 1
store i32 %167, i32* %5
%168 = icmp slt i32 %167, %165
br i1 %168, label %152, label %169
169: ; preds = %164, %146
%170 = call i32 @putchar(i32 10)
br label %373
171: ; preds = %38
%172 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.59, i64 0, i64 0))
%173 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %5)
%174 = load i32, i32* %5
%175 = icmp slt i32 %174, 1
%176 = load i32, i32* %4
%177 = icmp sgt i32 %174, %176
%178 = select i1 %175, i1 true, i1 %177
br i1 %178, label %179, label %181
179: ; preds = %171
%180 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.62, i64 0, i64 0))
br label %373
181: ; preds = %171
%182 = add nsw i32 %174, -1
%183 = zext i32 %182 to i64
%184 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %183
%185 = load i32, i32* %184
%186 = icmp eq i32 %185, 0
br i1 %186, label %187, label %189
187: ; preds = %181
store i32 1, i32* %184
%188 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.61, i64 0, i64 0))
br label %373
189: ; preds = %181
%190 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.60, i64 0, i64 0))
br label %373
191: ; preds = %56, %199
%192 = phi i64 [ 0, %56 ], [ %200, %199 ]
%193 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %192
%194 = load i32, i32* %193
%195 = icmp eq i32 %194, 0
br i1 %195, label %196, label %199
196: ; preds = %191
%197 = trunc i64 %192 to i32
%198 = and i32 %197, 3
switch i32 %198, label %199 [
i32 0, label %203
i32 3, label %203
]
199: ; preds = %196, %191
%200 = add nuw nsw i64 %192, 1
%201 = icmp eq i64 %200, %58
br i1 %201, label %202, label %191
202: ; preds = %199
store i32 %57, i32* %5
br label %211
203: ; preds = %196, %196
%204 = trunc i64 %192 to i32
store i32 %204, i32* %5
%205 = and i64 %192, 4294967295
%206 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %205
store i32 1, i32* %206
%207 = add nuw nsw i32 %204, 1
%208 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0), i32 %207)
br label %373
209: ; preds = %52
store i32 0, i32* %5
%210 = icmp eq i32 %54, 0
br i1 %210, label %211, label %219
211: ; preds = %202, %209
%212 = add nsw i32 %53, -1
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %213
%215 = load i32, i32* %214
%216 = icmp eq i32 %215, 0
br i1 %216, label %217, label %219
217: ; preds = %211
store i32 1, i32* %214
%218 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.25, i64 0, i64 0), i32 %53)
br label %373
219: ; preds = %211, %209
%220 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.58, i64 0, i64 0))
br label %373
221: ; preds = %38
%222 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.59, i64 0, i64 0))
%223 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %5)
%224 = load i32, i32* %5
%225 = icmp slt i32 %224, 1
%226 = load i32, i32* %4
%227 = icmp sgt i32 %224, %226
%228 = select i1 %225, i1 true, i1 %227
br i1 %228, label %229, label %231
229: ; preds = %221
%230 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.62, i64 0, i64 0))
br label %373
231: ; preds = %221
%232 = add nsw i32 %224, -1
%233 = zext i32 %232 to i64
%234 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %233
%235 = load i32, i32* %234
%236 = icmp eq i32 %235, 0
br i1 %236, label %239, label %237
237: ; preds = %231
store i32 0, i32* %234
%238 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.56, i64 0, i64 0))
br label %373
239: ; preds = %231
%240 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.55, i64 0, i64 0))
br label %373
241: ; preds = %38
%242 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.59, i64 0, i64 0))
%243 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32* %5)
%244 = load i32, i32* %5
%245 = icmp slt i32 %244, 1
%246 = load i32, i32* %4
%247 = icmp sgt i32 %244, %246
%248 = select i1 %245, i1 true, i1 %247
br i1 %248, label %249, label %251
249: ; preds = %241
%250 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.62, i64 0, i64 0))
br label %373
251: ; preds = %241
%252 = add nsw i32 %244, -1
%253 = zext i32 %252 to i64
%254 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %253
%255 = load i32, i32* %254
%256 = icmp eq i32 %255, 0
br i1 %256, label %259, label %257
257: ; preds = %251
%258 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.52, i64 0, i64 0))
br label %373
259: ; preds = %251
%260 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.51, i64 0, i64 0))
br label %373
261: ; preds = %38
%262 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.49, i64 0, i64 0))
store i32 0, i32* %5
%263 = load i32, i32* %4
%264 = icmp sgt i32 %263, 0
br i1 %264, label %265, label %282
265: ; preds = %261, %277
%266 = phi i32 [ %278, %277 ], [ %263, %261 ]
%267 = phi i32 [ %280, %277 ], [ 0, %261 ]
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %268
%270 = load i32, i32* %269
%271 = icmp eq i32 %270, 0
br i1 %271, label %277, label %272
272: ; preds = %265
%273 = add nsw i32 %267, 1
%274 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 %273)
%275 = load i32, i32* %5
%276 = load i32, i32* %4
br label %277
277: ; preds = %265, %272
%278 = phi i32 [ %266, %265 ], [ %276, %272 ]
%279 = phi i32 [ %267, %265 ], [ %275, %272 ]
%280 = add nsw i32 %279, 1
store i32 %280, i32* %5
%281 = icmp slt i32 %280, %278
br i1 %281, label %265, label %282
282: ; preds = %277, %261
%283 = call i32 @putchar(i32 10)
br label %373
284: ; preds = %38
%285 = call i32 @puts(i8* %7)
store i32 0, i32* %5
%286 = load i32, i32* %4
%287 = icmp sgt i32 %286, 0
br i1 %287, label %288, label %322
288: ; preds = %284, %317
%289 = phi i32 [ %319, %317 ], [ 0, %284 ]
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %290
%292 = load i32, i32* %291
%293 = icmp eq i32 %292, 0
%294 = select i1 %293, i32 95, i32 42
%295 = call i32 @putchar(i32 %294)
%296 = load i32, i32* %5
%297 = srem i32 %296, 4
%298 = icmp eq i32 %297, 1
br i1 %298, label %299, label %306
299: ; preds = %288
%300 = load i32, i32* %4
%301 = add nsw i32 %300, -4
%302 = icmp slt i32 %296, %301
br i1 %302, label %303, label %306
303: ; preds = %299
%304 = call i32 @putchar(i32 32)
%305 = load i32, i32* %5
br label %306
306: ; preds = %303, %299, %288
%307 = phi i32 [ %305, %303 ], [ %296, %299 ], [ %296, %288 ]
%308 = srem i32 %307, 4
%309 = icmp eq i32 %308, 3
br i1 %309, label %310, label %317
310: ; preds = %306
%311 = load i32, i32* %4
%312 = add nsw i32 %311, -4
%313 = icmp slt i32 %307, %312
br i1 %313, label %314, label %317
314: ; preds = %310
%315 = call i32 @putchar(i32 10)
%316 = load i32, i32* %5
br label %317
317: ; preds = %306, %310, %314
%318 = phi i32 [ %307, %306 ], [ %307, %310 ], [ %316, %314 ]
%319 = add nsw i32 %318, 1
store i32 %319, i32* %5
%320 = load i32, i32* %4
%321 = icmp slt i32 %319, %320
br i1 %321, label %288, label %322
322: ; preds = %317, %284
%323 = call i32 @putchar(i32 10)
br label %373
324: ; preds = %38
%325 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.36, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.37, i64 0, i64 0))
%326 = icmp eq i32* %325, null
br i1 %326, label %327, label %330
327: ; preds = %324
%328 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.48, i64 0, i64 0))
%329 = call i32 @exit(i32 1)
unreachable
330: ; preds = %324
%331 = call i32 (i32*, i8*, ...) @fprintf(i32* %325, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i64 0, i64 0), i8* %7)
store i32 0, i32* %5
%332 = load i32, i32* %4
%333 = icmp sgt i32 %332, 0
br i1 %333, label %334, label %368
334: ; preds = %330, %363
%335 = phi i32 [ %365, %363 ], [ 0, %330 ]
%336 = sext i32 %335 to i64
%337 = getelementptr inbounds [53 x i32], [53 x i32]* %1, i64 0, i64 %336
%338 = load i32, i32* %337
%339 = icmp eq i32 %338, 0
%340 = select i1 %339, i32 95, i32 42
%341 = call i32 @fputc(i32 %340, i32* %325)
%342 = load i32, i32* %5
%343 = srem i32 %342, 4
%344 = icmp eq i32 %343, 1
br i1 %344, label %345, label %352
345: ; preds = %334
%346 = load i32, i32* %4
%347 = add nsw i32 %346, -4
%348 = icmp slt i32 %342, %347
br i1 %348, label %349, label %352
349: ; preds = %345
%350 = call i32 @fputc(i32 32, i32* %325)
%351 = load i32, i32* %5
br label %352
352: ; preds = %349, %345, %334
%353 = phi i32 [ %351, %349 ], [ %342, %345 ], [ %342, %334 ]
%354 = srem i32 %353, 4
%355 = icmp eq i32 %354, 3
br i1 %355, label %356, label %363
356: ; preds = %352
%357 = load i32, i32* %4
%358 = add nsw i32 %357, -4
%359 = icmp slt i32 %353, %358
br i1 %359, label %360, label %363
360: ; preds = %356
%361 = call i32 @fputc(i32 10, i32* %325)
%362 = load i32, i32* %5
br label %363
363: ; preds = %352, %356, %360
%364 = phi i32 [ %353, %352 ], [ %353, %356 ], [ %362, %360 ]
%365 = add nsw i32 %364, 1
store i32 %365, i32* %5
%366 = load i32, i32* %4
%367 = icmp slt i32 %365, %366
br i1 %367, label %334, label %368
368: ; preds = %363, %330
%369 = call i32 @fputc(i32 10, i32* %325)
%370 = call i32 @fclose(i32* %325)
br label %373
371: ; preds = %38
%372 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.63, i64 0, i64 0))
br label %373
373: ; preds = %249, %259, %257, %229, %239, %237, %203, %219, %217, %179, %189, %187, %371, %368, %322, %282, %169
%374 = load i32, i32* %6
%375 = icmp eq i32 %374, 0
br i1 %375, label %376, label %38
376: ; preds = %38, %373
ret i32 0
}