// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x50, %rsp
movq 0x56cf(%rip), %rbx      # 0x6fd0
leaq 0x29cb(%rip), %rsi      # 0x42d3
movl $0x2c, %edx
movq %rbx, %rdi
callq 0x10d0
xorl %eax, %eax
movq %rax, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
movabsq $0x7fffffff7fffffff, %rcx # imm = 0x7FFFFFFF7FFFFFFF
movq %rcx, -0x3c(%rbp)
movq %rax, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
leaq 0x2805(%rip), %rsi      # 0x4144
movl $0x1, %edx
movq %rbx, %rdi
callq 0x10d0
movabsq $0x100000001, %rax      # imm = 0x100000001
leaq -0x70(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x48(%rbp), %rdi
movl $0x2, %edx
movl $0x5, %ecx
callq 0x2670
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq -0x70(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x2670
movabsq $0x700000002, %rax      # imm = 0x700000002
leaq -0x70(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
movl $0x2710, %ecx           # imm = 0x2710
callq 0x2670
leaq -0x70(%rbp), %rsi
movq $0x0, (%rsi)
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
movl $0x5, %ecx
callq 0x2670
movabsq $0x400000002, %rax      # imm = 0x400000002
leaq -0x70(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x2670
movabsq $0x400000005, %rax      # imm = 0x400000005
leaq -0x70(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x48(%rbp), %rdi
movl $0xc8, %edx
movl $0xfa0, %ecx            # imm = 0xFA0
callq 0x2670
leaq -0x70(%rbp), %rsi
movq $0x1, (%rsi)
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
movl $0x5, %ecx
callq 0x2670
cmpl $0x5, -0x28(%rbp)
jne 0x1c12
cmpl $0xc8, -0x3c(%rbp)
jne 0x1c31
cmpl $0x2710, -0x38(%rbp)    # imm = 0x2710
jne 0x1c50
movq -0x30(%rbp), %r12
testq %r12, %r12
je 0x1ad9
movq 0x5563(%rip), %rbx      # 0x6fd0
leaq 0x28eb(%rip), %r14      # 0x435f
movq 0x8(%r12), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x1120
movq %rax, %r15
movl $0x2, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x10d0
movq 0x8(%r12), %rax
movl 0x4(%rax), %esi
movq %r15, %rdi
callq 0x1120
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1080
movq (%r12), %r12
testq %r12, %r12
jne 0x1a74
movq 0x54f0(%rip), %rdi      # 0x6fd0
leaq 0x287b(%rip), %rsi      # 0x4362
movl $0x28, %edx
callq 0x10d0
leaq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2884
leaq -0x48(%rbp), %rdi
movq 0x18(%rdi), %rsi
callq 0x2fee
movq $0x0, -0x30(%rbp)
movq -0x58(%rbp), %r12
testq %r12, %r12
je 0x1b8f
movq 0x54ad(%rip), %rbx      # 0x6fd0
leaq 0x2835(%rip), %r14      # 0x435f
movq 0x8(%r12), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x1120
movq %rax, %r15
movl $0x2, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x10d0
movq 0x8(%r12), %rax
movl 0x4(%rax), %esi
movq %r15, %rdi
callq 0x1120
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1080
movq (%r12), %r12
testq %r12, %r12
jne 0x1b2a
leaq -0x70(%rbp), %rdi
callq 0x293b
cmpl $0x2, %eax
jne 0x1c6f
movq 0x5428(%rip), %rdi      # 0x6fd0
leaq 0x270f(%rip), %rsi      # 0x42be
movl $0x14, %edx
callq 0x10d0
movq 0x5410(%rip), %rdi      # 0x6fd0
movl $0x2, %esi
callq 0x1120
leaq 0x27ba(%rip), %rsi      # 0x438b
movl $0x5, %edx
movq %rax, %rdi
callq 0x10d0
leaq -0x70(%rbp), %rdi
movq 0x18(%rdi), %rsi
callq 0x2fee
leaq -0x70(%rbp), %rdi
movq $0x0, 0x18(%rdi)
callq 0x299e
leaq -0x48(%rbp), %rdi
callq 0x299e
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26e7(%rip), %rdi      # 0x4300
leaq 0x242b(%rip), %rsi      # 0x404b
leaq 0x26ed(%rip), %rcx      # 0x4314
movl $0x76, %edx
callq 0x1070
leaq 0x26ee(%rip), %rdi      # 0x4326
leaq 0x240c(%rip), %rsi      # 0x404b
leaq 0x26ce(%rip), %rcx      # 0x4314
movl $0x77, %edx
callq 0x1070
leaq 0x26e9(%rip), %rdi      # 0x4340
leaq 0x23ed(%rip), %rsi      # 0x404b
leaq 0x26af(%rip), %rcx      # 0x4314
movl $0x78, %edx
callq 0x1070
leaq 0x2483(%rip), %rdi      # 0x40f9
leaq 0x23ce(%rip), %rsi      # 0x404b
leaq 0x2690(%rip), %rcx      # 0x4314
movl $0x83, %edx
callq 0x1070
jmp 0x1ca6
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1cb4
jmp 0x1ca6
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x299e
jmp 0x1cb7
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x299e
movq %rbx, %rdi
callq 0x1130