// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/main.cpp
// Function: test_point()
void test_point(){
  std::cout << "\ntest stampa matrice di point con iteratore\n";
  smatrixp testp(point(0,0));
 
  std::cout << "\n";
  testp.add(point(1,1), 2, 5);
  testp.add(point(1,2), 1, 2);
  testp.add(point(2,7), 0, 10000);
  testp.add(point(0,0), 1, 5);
  testp.add(point(2,4), 1, 2);
  testp.add(point(5,4), 200, 4000);
  testp.add(point(1,0), 1, 5);
  assert(testp.get_size()==5);
  assert(testp.get_size_row()==200);
  assert(testp.get_size_column()==10000);  
  smatrixp::iterator ip,iep;
   for(ip=testp.begin(), iep=testp.end(); ip != iep; ip++)
     std::cout << ip->v.a << ", " << ip->v.b << std::endl;
  std::cout << "\ntest stampa matrice di point assegnata\n";
  smatrixp testpp = testp;
  testp.clear();
  for(ip=testpp.begin(), iep=testpp.end(); ip!=iep; ip++)
    std::cout << ip->v.a << ", " << ip->v.b << std::endl;
  pointxMax max;
  int count = evaluate(testpp, max);
  assert(count == 2);
  std::cout << "valori accettabili: " << count << " = 2\n";
  testpp.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq 0x4826(%rip), %rbx      # 0x5fd0
leaq 0x1b22(%rip), %rsi      # 0x32d3
movq %rbx, %rdi
callq 0x10b0
andq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movabsq $0x7fffffff7fffffff, %rax # imm = 0x7FFFFFFF7FFFFFFF
movq %rax, -0x34(%rbp)
andq $0x0, -0x28(%rbp)
andl $0x0, -0x20(%rbp)
leaq 0x1964(%rip), %rsi      # 0x3144
movq %rbx, %rdi
callq 0x10b0
movabsq $0x100000001, %rax      # imm = 0x100000001
leaq -0x68(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x40(%rbp), %rdi
pushq $0x2
popq %rdx
pushq $0x5
popq %rcx
callq 0x2304
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq -0x68(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x40(%rbp), %rdi
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
callq 0x2304
movabsq $0x700000002, %rax      # imm = 0x700000002
leaq -0x68(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x40(%rbp), %rdi
xorl %edx, %edx
movl $0x2710, %ecx           # imm = 0x2710
callq 0x2304
leaq -0x68(%rbp), %rsi
andq $0x0, (%rsi)
leaq -0x40(%rbp), %rdi
pushq $0x1
popq %rdx
pushq $0x5
popq %rcx
callq 0x2304
movabsq $0x400000002, %rax      # imm = 0x400000002
leaq -0x68(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x40(%rbp), %rdi
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
callq 0x2304
movabsq $0x400000005, %rax      # imm = 0x400000005
leaq -0x68(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x40(%rbp), %rdi
movl $0xc8, %edx
movl $0xfa0, %ecx            # imm = 0xFA0
callq 0x2304
leaq -0x68(%rbp), %rsi
movq $0x1, (%rsi)
leaq -0x40(%rbp), %rdi
pushq $0x1
popq %rdx
pushq $0x5
popq %rcx
callq 0x2304
cmpl $0x5, -0x20(%rbp)
jne 0x1a08
cmpl $0xc8, -0x34(%rbp)
jne 0x1a21
cmpl $0x2710, -0x30(%rbp)    # imm = 0x2710
jne 0x1a3a
leaq -0x28(%rbp), %r15
movq 0x46e3(%rip), %rbx      # 0x5fd0
leaq 0x1a6b(%rip), %r14      # 0x335f
movq (%r15), %r15
testq %r15, %r15
je 0x192e
movq 0x8(%r15), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
movq 0x8(%r15), %rcx
movl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0x1100
movq %rax, %rdi
callq 0x1050
jmp 0x18f4
movq 0x469b(%rip), %rdi      # 0x5fd0
leaq 0x1a26(%rip), %rsi      # 0x3362
callq 0x10b0
leaq -0x68(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x24e2
leaq -0x40(%rbp), %rdi
callq 0x2586
leaq -0x50(%rbp), %r15
movq 0x466e(%rip), %rbx      # 0x5fd0
leaq 0x19f6(%rip), %r14      # 0x335f
movq (%r15), %r15
testq %r15, %r15
je 0x19a3
movq 0x8(%r15), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
movq 0x8(%r15), %rcx
movl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0x1100
movq %rax, %rdi
callq 0x1050
jmp 0x1969
leaq -0x68(%rbp), %rdi
callq 0x25a4
cmpl $0x2, %eax
jne 0x1a57
movq 0x4614(%rip), %rdi      # 0x5fd0
leaq 0x18fb(%rip), %rsi      # 0x32be
callq 0x10b0
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0x1100
leaq 0x19b1(%rip), %rsi      # 0x338b
movq %rax, %rdi
callq 0x10b0
leaq -0x68(%rbp), %rdi
callq 0x2586
leaq -0x68(%rbp), %rdi
callq 0x25fc
leaq -0x40(%rbp), %rdi
callq 0x25fc
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18f1(%rip), %rdi      # 0x3300
leaq 0x1635(%rip), %rsi      # 0x304b
leaq 0x18f7(%rip), %rcx      # 0x3314
pushq $0x76
jmp 0x1a51
leaq 0x18fe(%rip), %rdi      # 0x3326
leaq 0x161c(%rip), %rsi      # 0x304b
leaq 0x18de(%rip), %rcx      # 0x3314
pushq $0x77
jmp 0x1a51
leaq 0x18ff(%rip), %rdi      # 0x3340
leaq 0x1603(%rip), %rsi      # 0x304b
leaq 0x18c5(%rip), %rcx      # 0x3314
pushq $0x78
popq %rdx
callq 0x1070
leaq 0x169b(%rip), %rdi      # 0x30f9
leaq 0x15e6(%rip), %rsi      # 0x304b
leaq 0x18a8(%rip), %rcx      # 0x3314
movl $0x83, %edx
callq 0x1070
jmp 0x1a8e
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a9c
jmp 0x1a8e
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x25fc
jmp 0x1a9f
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x25fc
movq %rbx, %rdi
callq 0x1110