// File: 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
subq $0x730, %rsp            # imm = 0x730
leaq 0x1eb1(%rip), %rsi      # 0x5293
leaq -0x208(%rbp), %rdi
movl $0x8, %edx
callq 0x22f0
leaq -0x229(%rbp), %rdi
movq %rdi, -0x5c8(%rbp)
callq 0x22d0
movq -0x5c8(%rbp), %rdx
leaq 0x1ee0(%rip), %rsi      # 0x52f4
leaq -0x228(%rbp), %rdi
callq 0x4110
jmp 0x3422
leaq -0x229(%rbp), %rdi
callq 0x21b0
leaq -0x261(%rbp), %rdi
movq %rdi, -0x5d0(%rbp)
callq 0x22d0
movq -0x5d0(%rbp), %rdx
leaq 0x1ea5(%rip), %rsi      # 0x52f4
leaq -0x260(%rbp), %rdi
callq 0x4110
jmp 0x345d
leaq -0x261(%rbp), %rdi
callq 0x21b0
movl $0x10, %edi
callq 0x2170
movq %rax, -0x5d8(%rbp)
jmp 0x347c
movq -0x5d8(%rbp), %rdi
callq 0x25e0
jmp 0x348a
movq -0x5d8(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x2270
movb %al, -0x5d9(%rbp)
jmp 0x34ac
movb -0x5d9(%rbp), %al
testb $0x1, %al
jne 0x34bb
jmp 0x3e77
movl $0x0, -0x274(%rbp)
leaq -0x208(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x2060
movq %rax, -0x5e8(%rbp)
jmp 0x34e1
movq -0x5e8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x21f0
movb %al, -0x5e9(%rbp)
jmp 0x34ff
movb -0x5e9(%rbp), %al
testb $0x1, %al
jne 0x350e
jmp 0x3d41
movl $0x10, %edi
movl $0x8, %esi
callq 0x41c0
movl %eax, -0x5f0(%rbp)
jmp 0x3525
movl -0x5f0(%rbp), %edx
leaq -0x400(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x2260
jmp 0x3540
movl $0x0, -0x404(%rbp)
movq -0x270(%rbp), %rax
movq %rax, -0x600(%rbp)
movl $0x10, %edi
callq 0x2170
movq %rax, -0x5f8(%rbp)
jmp 0x356b
movq -0x5f8(%rbp), %rdi
callq 0x2990
jmp 0x3579
movq -0x5f8(%rbp), %rsi
movq -0x600(%rbp), %rdi
callq 0x2720
jmp 0x358e
jmp 0x3590
leaq -0x400(%rbp), %rdi
leaq -0x260(%rbp), %rsi
movl $0x20, %edx
callq 0x2300
movq %rax, -0x608(%rbp)
jmp 0x35b1
movq -0x608(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x21f0
movb %al, -0x609(%rbp)
jmp 0x35cf
movb -0x609(%rbp), %al
testb $0x1, %al
jne 0x35de
jmp 0x3d10
movl $0x10, %edi
movl $0x8, %esi
callq 0x41c0
movl %eax, -0x610(%rbp)
jmp 0x35f5
movl -0x610(%rbp), %edx
leaq -0x590(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x2260
jmp 0x3610
movl $0x0, -0x594(%rbp)
leaq -0x590(%rbp), %rdi
leaq -0x594(%rbp), %rsi
callq 0x20d0
jmp 0x362f
movb -0x594(%rbp), %al
movb %al, -0x595(%rbp)
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x618(%rbp)
jmp 0x3656
movq -0x618(%rbp), %rdi
callq 0x29b0
movl %eax, -0x61c(%rbp)
jmp 0x366a
movl -0x61c(%rbp), %eax
cmpl $0x0, %eax
jne 0x38ee
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x628(%rbp)
jmp 0x3694
movq -0x628(%rbp), %rdi
leaq -0x595(%rbp), %rsi
callq 0x2b10
jmp 0x36a9
jmp 0x3cac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x229(%rbp), %rdi
callq 0x21b0
jmp 0x3ebe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x261(%rbp), %rdi
callq 0x21b0
jmp 0x3eb2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x3ea6
movq -0x5d8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
movl $0x10, %esi
callq 0x2180
jmp 0x3ea6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x3d30
movq -0x5f8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
movl $0x10, %esi
callq 0x2180
jmp 0x3d30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x3d02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
movl -0x23c(%rbp), %eax
movl %eax, -0x62c(%rbp)
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x383a
movq -0x238(%rbp), %rdi
callq 0x20a0
movq %rax, -0x5b8(%rbp)
movq -0x5b8(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq 0x480f(%rip), %rdi      # 0x7ff0
callq 0x2160
movq %rax, -0x638(%rbp)
jmp 0x37ef
movq -0x638(%rbp), %rdi
leaq 0x1af1(%rip), %rsi      # 0x52ee
callq 0x2160
movq %rax, -0x640(%rbp)
jmp 0x380b
movq -0x640(%rbp), %rdi
movq 0x4797(%rip), %rsi      # 0x7fb0
callq 0x2190
jmp 0x3820
callq 0x2280
jmp 0x3827
jmp 0x3829
leaq -0x590(%rbp), %rdi
callq 0x2120
jmp 0x3590
movl -0x62c(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x38c1
movq -0x238(%rbp), %rdi
callq 0x20a0
movq %rax, -0x5b0(%rbp)
movq -0x5b0(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq 0x477a(%rip), %rdi      # 0x7ff0
callq 0x2160
movq %rax, -0x648(%rbp)
jmp 0x3884
movq -0x648(%rbp), %rdi
leaq 0x1a54(%rip), %rsi      # 0x52e6
callq 0x2160
movq %rax, -0x650(%rbp)
jmp 0x38a0
movq -0x650(%rbp), %rdi
movq 0x4702(%rip), %rsi      # 0x7fb0
callq 0x2190
jmp 0x38b5
callq 0x2280
jmp 0x38bc
jmp 0x3829
movq -0x238(%rbp), %rdi
callq 0x20a0
movq 0x46ec(%rip), %rdi      # 0x7fc0
leaq 0x19c8(%rip), %rsi      # 0x52a3
callq 0x2160
jmp 0x38e2
callq 0x2280
jmp 0x38e9
jmp 0x3829
movl $0x0, -0x59c(%rbp)
movl -0x59c(%rbp), %eax
movl %eax, -0x65c(%rbp)
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x658(%rbp)
jmp 0x391f
movq -0x658(%rbp), %rdi
callq 0x29b0
movl %eax, -0x660(%rbp)
jmp 0x3933
movl -0x65c(%rbp), %eax
movl -0x660(%rbp), %ecx
cmpl %ecx, %eax
je 0x3caa
movb -0x595(%rbp), %al
movb %al, -0x669(%rbp)
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x668(%rbp)
jmp 0x396e
movq -0x668(%rbp), %rdi
movl -0x59c(%rbp), %esi
callq 0x30e0
movq %rax, -0x678(%rbp)
jmp 0x3989
movb -0x669(%rbp), %al
movq -0x678(%rbp), %rcx
movzbl (%rcx), %esi
movzbl %al, %edi
callq 0x3ee0
movl %eax, -0x67c(%rbp)
jmp 0x39a9
movl -0x67c(%rbp), %eax
movl %eax, -0x5a0(%rbp)
movl -0x5a0(%rbp), %eax
cmpl -0x404(%rbp), %eax
jl 0x3b12
movl -0x5a0(%rbp), %eax
movl %eax, -0x404(%rbp)
movb -0x595(%rbp), %al
movb %al, -0x689(%rbp)
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x688(%rbp)
jmp 0x39fa
movq -0x688(%rbp), %rdi
movl -0x59c(%rbp), %esi
callq 0x30e0
movq %rax, -0x698(%rbp)
jmp 0x3a15
movb -0x689(%rbp), %al
movq -0x698(%rbp), %rcx
movzbl (%rcx), %esi
movzbl %al, %edi
callq 0x3f60
movl %eax, -0x69c(%rbp)
jmp 0x3a35
movl -0x69c(%rbp), %eax
movl %eax, -0x5a4(%rbp)
cmpl $0x0, -0x5a4(%rbp)
jne 0x3a87
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x6a8(%rbp)
jmp 0x3a65
movq -0x6a8(%rbp), %rdi
movl -0x59c(%rbp), %esi
incl %esi
leaq -0x595(%rbp), %rdx
callq 0x2b40
jmp 0x3a82
jmp 0x3b0d
movl -0x5a4(%rbp), %eax
cmpl -0x59c(%rbp), %eax
jl 0x3ac9
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x6b0(%rbp)
jmp 0x3ab0
movq -0x6b0(%rbp), %rdi
xorl %esi, %esi
leaq -0x595(%rbp), %rdx
callq 0x2b40
jmp 0x3ac7
jmp 0x3b0b
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x6b8(%rbp)
jmp 0x3ae4
movq -0x6b8(%rbp), %rdi
movl -0x59c(%rbp), %esi
movl -0x5a4(%rbp), %eax
subl %eax, %esi
incl %esi
leaq -0x595(%rbp), %rdx
callq 0x2b40
jmp 0x3b09
jmp 0x3b0b
jmp 0x3b0d
jmp 0x3caa
movl -0x59c(%rbp), %eax
movl %eax, -0x6c4(%rbp)
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x6c0(%rbp)
jmp 0x3b39
movq -0x6c0(%rbp), %rdi
callq 0x29b0
movl %eax, -0x6c8(%rbp)
jmp 0x3b4d
movl -0x6c4(%rbp), %eax
movl -0x6c8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3c92
movb -0x595(%rbp), %al
movb %al, -0x6d1(%rbp)
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x6d0(%rbp)
jmp 0x3b8b
movq -0x6d0(%rbp), %rdi
callq 0x2a80
movq %rax, -0x6e0(%rbp)
jmp 0x3ba0
movb -0x6d1(%rbp), %al
movq -0x6e0(%rbp), %rcx
movzbl (%rcx), %esi
movzbl %al, %edi
callq 0x3f60
movl %eax, -0x6e4(%rbp)
jmp 0x3bc0
movl -0x6e4(%rbp), %eax
movl %eax, -0x5a8(%rbp)
cmpl $0x0, -0x5a8(%rbp)
jne 0x3c0a
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x6f0(%rbp)
jmp 0x3bf0
movq -0x6f0(%rbp), %rdi
leaq -0x595(%rbp), %rsi
callq 0x2b10
jmp 0x3c05
jmp 0x3c90
movl -0x5a8(%rbp), %eax
cmpl -0x59c(%rbp), %eax
jl 0x3c4c
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x6f8(%rbp)
jmp 0x3c33
movq -0x6f8(%rbp), %rdi
xorl %esi, %esi
leaq -0x595(%rbp), %rdx
callq 0x2b40
jmp 0x3c4a
jmp 0x3c8e
movq -0x270(%rbp), %rdi
movl -0x274(%rbp), %esi
callq 0x2680
movq %rax, -0x700(%rbp)
jmp 0x3c67
movq -0x700(%rbp), %rdi
movl -0x59c(%rbp), %esi
movl -0x5a8(%rbp), %eax
subl %eax, %esi
incl %esi
leaq -0x595(%rbp), %rdx
callq 0x2b40
jmp 0x3c8c
jmp 0x3c8e
jmp 0x3c90
jmp 0x3caa
jmp 0x3c94
jmp 0x3c96
movl -0x59c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x59c(%rbp)
jmp 0x38f8
jmp 0x3cac
jmp 0x3829
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
callq 0x2280
jmp 0x3cca
jmp 0x3d02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
callq 0x2280
jmp 0x3ce5
jmp 0x3d02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
callq 0x2280
jmp 0x3d00
jmp 0x3d02
leaq -0x590(%rbp), %rdi
callq 0x2120
jmp 0x3d30
leaq -0x400(%rbp), %rdi
callq 0x2120
movl -0x274(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x274(%rbp)
jmp 0x34c5
leaq -0x400(%rbp), %rdi
callq 0x2120
jmp 0x3ea6
movq 0x4278(%rip), %rdi      # 0x7fc0
movq 0x4261(%rip), %rsi      # 0x7fb0
callq 0x2190
jmp 0x3d56
movl $0x0, -0x5bc(%rbp)
movl -0x5bc(%rbp), %eax
movl %eax, -0x708(%rbp)
movq -0x270(%rbp), %rdi
callq 0x2640
movl %eax, -0x704(%rbp)
jmp 0x3d80
movl -0x708(%rbp), %eax
movl -0x704(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3e44
movl -0x5bc(%rbp), %esi
incl %esi
movq 0x421d(%rip), %rdi      # 0x7fc0
callq 0x22b0
movq %rax, -0x710(%rbp)
jmp 0x3db1
movq -0x710(%rbp), %rdi
leaq 0x1536(%rip), %rsi      # 0x52f5
callq 0x2160
movq %rax, -0x718(%rbp)
jmp 0x3dcd
movq -0x718(%rbp), %rdi
movq 0x41d5(%rip), %rsi      # 0x7fb0
callq 0x2190
jmp 0x3de2
movq -0x270(%rbp), %rdi
movl -0x5bc(%rbp), %esi
callq 0x2680
movq %rax, -0x720(%rbp)
jmp 0x3dfd
movq -0x720(%rbp), %rsi
movq 0x41b5(%rip), %rdi      # 0x7fc0
callq 0x3190
movq %rax, -0x728(%rbp)
jmp 0x3e19
movq -0x728(%rbp), %rdi
movq 0x4189(%rip), %rsi      # 0x7fb0
callq 0x2190
jmp 0x3e2e
jmp 0x3e30
movl -0x5bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5bc(%rbp)
jmp 0x3d60
movq -0x270(%rbp), %rax
movq %rax, -0x730(%rbp)
cmpq $0x0, %rax
je 0x3e75
movq -0x730(%rbp), %rdi
callq 0x2860
movq -0x730(%rbp), %rdi
movl $0x10, %esi
callq 0x2180
jmp 0x3e77
leaq -0x260(%rbp), %rdi
callq 0x20e0
leaq -0x228(%rbp), %rdi
callq 0x20e0
leaq -0x208(%rbp), %rdi
callq 0x2070
xorl %eax, %eax
addq $0x730, %rsp            # imm = 0x730
popq %rbp
retq
leaq -0x260(%rbp), %rdi
callq 0x20e0
leaq -0x228(%rbp), %rdi
callq 0x20e0
leaq -0x208(%rbp), %rdi
callq 0x2070
movq -0x238(%rbp), %rdi
callq 0x22c0
movq %rax, %rdi
callq 0x33a0
nop