// File: /workspace/github_cpp_makefile_star2_O2/fatiiates[P]CDLL-with-cpp-make-gcc/./src/Test.cpp
// Function: readSayilar()
int readSayilar(){
  ifstream file("doc/Sayilar.txt");
  string line = "", cell = "";
  ArrayList* rows = new ArrayList();
  if ( file.is_open() ){
    for (int j = 0; getline(file, line);j++){

      stringstream row(line);
      int MAXOBEB = 0;
      rows->add(new CircularDoublyLinkedList());
      while ( getline(row, cell, ' ') ) {
      	stringstream intTicket(cell);
      	int item = 0;
      	intTicket >> item;
        try {
          unsigned char ch = (unsigned char)item;

          if(rows->elementAt(j)->Count() == 0)
            rows->elementAt(j)->add(ch);
          else{
            for (int i = 0; i != rows->elementAt(j)->Count();i++) {
              int ebob = obeb(ch, rows->elementAt(j)->elementAt(i));

              if(ebob >= MAXOBEB){
                MAXOBEB = ebob;
                int val = mod(ch, rows->elementAt(j)->elementAt(i));
                if(val == 0)
                  rows->elementAt(j)->insert(i+1, ch);
                else{
                  if(val >= i)
                    rows->elementAt(j)->insert(0, ch);
                  else
                    rows->elementAt(j)->insert(i-val+1, ch);
                }
                break;
              }else if(i == rows->elementAt(j)->Count() - 1){
                int val = mod(ch, rows->elementAt(j)->last());
                if(val == 0)
                  rows->elementAt(j)->add(ch);
                else
                  if(val >= i)
                    rows->elementAt(j)->insert(0, ch);
                  else
                    rows->elementAt(j)->insert(i-val+1, ch);
                break;
              }
            }
          }
        } catch (invalid_argument& e) {
          cerr << e.what() << " TEST "<<endl;
        } catch (length_error& e) {
          cerr << e.what() << " TEST 2"<< endl;
        } catch (...) {
          cout << "Bilinmeyen bir hata oluştu lütfen ilgili kişiye yönlendiriniz.";
        }
      }
    }
    cout << endl;
    for (int i = 0; i < rows->Count(); i++){
      cout << int(i+1) << ".Satir Sifre:"<< endl;
      cout << *rows->elementAt(i) << endl;
    }

    delete rows;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x568, %rsp            # imm = 0x568
leaq 0x168f(%rip), %rsi      # 0x4293
leaq -0x408(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x2240
leaq 0x16da(%rip), %rsi      # 0x42f4
leaq -0x78(%rbp), %rdi
leaq -0x200(%rbp), %rdx
callq 0x3228
leaq 0x16c3(%rip), %rsi      # 0x42f4
leaq -0x58(%rbp), %rdi
leaq -0x200(%rbp), %rdx
callq 0x3228
pushq $0x10
popq %rdi
callq 0x2160
movq %rax, %rbx
movq %rax, %rdi
callq 0x249a
leaq -0x390(%rbp), %rdi
callq 0x2060
testb %al, %al
je 0x3012
xorl %r14d, %r14d
leaq -0x408(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2f8e
leaq -0x200(%rbp), %rdi
leaq -0x78(%rbp), %rsi
pushq $0x18
popq %rdx
callq 0x21d0
pushq $0x10
popq %rdi
callq 0x2160
movq %rax, %r12
movq %rax, %rdi
callq 0x2682
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2540
movl $0x0, -0x30(%rbp)
leaq -0x200(%rbp), %rdi
leaq -0x58(%rbp), %rsi
pushq $0x20
popq %rdx
callq 0x2250
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2f7a
leaq -0x590(%rbp), %r15
movq %r15, %rdi
leaq -0x58(%rbp), %rsi
pushq $0x18
popq %rdx
callq 0x21d0
andl $0x0, -0x34(%rbp)
movq %r15, %rdi
leaq -0x34(%rbp), %rsi
callq 0x20f0
movb -0x34(%rbp), %al
movb %al, -0x29(%rbp)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %rax, %rdi
callq 0x2690
testl %eax, %eax
je 0x2d9d
pushq $0x1
popq %rax
movl %eax, %r13d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %rax, %rdi
callq 0x2690
leal -0x1(%r13), %r12d
cmpl %eax, %r12d
je 0x2eb9
movb -0x29(%rbp), %r15b
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %rax, %rdi
movl %r12d, %esi
callq 0x2a20
movzbl (%rax), %esi
movzbl %r15b, %edi
callq 0x30ed
cmpl -0x30(%rbp), %eax
jge 0x2db9
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %rax, %rdi
callq 0x2690
decl %eax
cmpl %eax, %r12d
je 0x2de5
incl %r13d
jmp 0x2d33
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x275c
jmp 0x2eb9
movl %eax, -0x30(%rbp)
movb -0x29(%rbp), %r15b
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %rax, %rdi
movl %r12d, %esi
callq 0x2a20
movb (%rax), %cl
cmpb %cl, %r15b
jbe 0x2e0b
movzbl %r15b, %eax
divb %cl
jmp 0x2e11
movb -0x29(%rbp), %r15b
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %rax, %rdi
callq 0x2700
movb (%rax), %cl
cmpb %cl, %r15b
jbe 0x2e31
movzbl %r15b, %eax
divb %cl
jmp 0x2e37
movzbl %cl, %eax
divb %r15b
movzbl %ah, %eax
testb %al, %al
je 0x2e57
movzbl %al, %r15d
cmpl %r15d, %r12d
jbe 0x2e7d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
subl %r15d, %r13d
jmp 0x2e8b
movzbl %cl, %eax
divb %r15b
movzbl %ah, %eax
testb %al, %al
je 0x2e64
movzbl %al, %r15d
cmpl %r15d, %r12d
jbe 0x2e9c
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
subl %r15d, %r13d
jmp 0x2eaa
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
jmp 0x2e8b
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x275c
jmp 0x2eb9
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
xorl %r13d, %r13d
movq %rax, %rdi
movl %r13d, %esi
leaq -0x29(%rbp), %rdx
callq 0x276c
jmp 0x2eb9
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
xorl %r13d, %r13d
movq %rax, %rdi
movl %r13d, %esi
leaq -0x29(%rbp), %rdx
callq 0x276c
leaq -0x590(%rbp), %rdi
callq 0x2120
jmp 0x2cc5
jmp 0x2ed2
jmp 0x2ed2
jmp 0x2ed2
jmp 0x2ed2
movq %rdx, %r12
movq %rax, %rdi
cmpl $0x3, %r12d
jne 0x2f19
callq 0x20a0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x30fd(%rip), %rdi      # 0x5ff0
movq %rax, %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x13e9(%rip), %rsi      # 0x42ee
callq 0x2150
movq %rax, %rdi
callq 0x20d0
callq 0x21e0
jmp 0x2eb9
callq 0x20a0
cmpl $0x2, %r12d
jne 0x2f5d
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x30bc(%rip), %rdi      # 0x5ff0
movq %rax, %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x13a0(%rip), %rsi      # 0x42e6
callq 0x2150
movq %rax, %rdi
callq 0x20d0
callq 0x21e0
jmp 0x2eb9
movq 0x305c(%rip), %rdi      # 0x5fc0
leaq 0x1338(%rip), %rsi      # 0x42a3
callq 0x2150
callq 0x21e0
jmp 0x2eb9
leaq -0x200(%rbp), %rdi
callq 0x2120
incl %r14d
jmp 0x2c6b
movq 0x302b(%rip), %rdi      # 0x5fc0
callq 0x20d0
xorl %r14d, %r14d
movq 0x301c(%rip), %r15      # 0x5fc0
leaq 0x134a(%rip), %r12      # 0x42f5
movq %rbx, %rdi
callq 0x24c6
cmpl %eax, %r14d
jge 0x2fff
incl %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0x2210
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
callq 0x20d0
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x24de
movq %r15, %rdi
movq %rax, %rsi
callq 0x2a66
incl %r14d
movq %rax, %rdi
callq 0x20d0
jmp 0x2fab
movq %rbx, %rdi
callq 0x25f6
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x2170
leaq -0x58(%rbp), %rdi
callq 0x20c0
leaq -0x78(%rbp), %rdi
callq 0x20c0
leaq -0x408(%rbp), %rdi
callq 0x2070
xorl %eax, %eax
addq $0x568, %rsp            # imm = 0x568
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
callq 0x21e0
jmp 0x30aa
jmp 0x30a7
movq %rax, %r14
callq 0x21e0
jmp 0x30aa
jmp 0x30a7
movq %rax, %r14
callq 0x21e0
jmp 0x30aa
movq %rax, %rdi
callq 0x2bcb
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x2170
jmp 0x30c7
movq %rax, %r14
jmp 0x30d0
movq %rax, %r14
jmp 0x30d9
jmp 0x30a0
jmp 0x30a0
movq %rax, %r14
pushq $0x10
popq %rsi
movq %r12, %rdi
callq 0x2170
jmp 0x30bb
jmp 0x30a0
jmp 0x30b8
movq %rax, %r14
jmp 0x30c7
jmp 0x30b8
movq %rax, %r14
leaq -0x590(%rbp), %rdi
callq 0x2120
jmp 0x30bb
movq %rax, %r14
leaq -0x200(%rbp), %rdi
callq 0x2120
leaq -0x58(%rbp), %rdi
callq 0x20c0
leaq -0x78(%rbp), %rdi
callq 0x20c0
leaq -0x408(%rbp), %rdi
callq 0x2070
movq %r14, %rdi
callq 0x2220