// File: /workspace/github_cpp_makefile_star2_O2/carlos-urena[P]svg-gen/main.cpp
// Function: main
int main( int argc, char * argv [] )
{
  using namespace std ;

  if ( argc < 3 )
  { cerr << "please specify figure number and name for .svg output file" << endl << flush ;
    return 1 ;
  }

  int arg1 ;
  try
  { arg1 = std::stoi(std::string(argv[1]));
  }
  catch ( std::exception e )
  { cerr << "cannot convert first argument to integer (" << argv[1] << ")" << endl ;
    return 1 ;
  }

  std::string arg2( argv[2] );

  //test_svg_simple( arg1 );
  //test_figura_estrella( arg1 );
  //test_poligonos_estilos( arg1 );

  Figure * fig = nullptr ;

  switch( arg1 )
  {
    case 1 :
      fig = new Figure1_HatBox(  );
      break ;
    case 2 :
      fig = new Figure2_ParamCil(  );
      break ;
    case 3 :
      fig = new Figure3_ParamConPol(  );
      break ;
    case 4 :
      fig = new Figure4_EllipseSectorZ(  );
      break ;
    case 5 :
      fig = new Figure5_EllipseSectorRadial() ;
      break ;
    case 6 :
      fig = new Figure6_SuplPara();
      break ;
    case 7 :
      fig = new Figure7_PSA_shape();
      break ;
    case 8 :
      fig = new Figure8_PSA_ellipse();
      break ;
    case 9 :
      fig = new Figure9_PSA_ellipse_lune();
      break ;
    case 10 :
      fig = new Figure10_PSA_lune();
      break ;
    default:
      cerr << "first argument is an out of range number (" << argv[1] << ")" << endl ;
      return 1 ;
  }

  fig->drawSVG( arg2 );

  return 0 ;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpl $0x2, %edi
jg 0x562a
movq 0xa9eb(%rip), %rdi      # 0xfff0
leaq 0x5ba4(%rip), %rsi      # 0xb1b0
callq 0x31a0
movq %rax, %rdi
callq 0x30d0
movq %rax, %rdi
callq 0x3120
pushq $0x1
popq %r14
jmp 0x57d0
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x30a0
leaq -0x40(%rbp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x58c0
movl %eax, %r14d
leaq -0x40(%rbp), %rdi
callq 0x30c0
movq 0x10(%rbx), %rsi
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x30a0
decl %r14d
cmpl $0x9, %r14d
ja 0x5767
leaq 0x5b0b(%rip), %rax      # 0xb188
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x88, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x343c
jmp 0x57b8
movl $0x88, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x3f16
jmp 0x57b8
movl $0xa8, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x51a8
jmp 0x57b8
movl $0x88, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x38b6
jmp 0x57b8
movl $0x88, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x3b7c
jmp 0x57b8
movl $0xa8, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x4f0c
jmp 0x57b8
movl $0x88, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x3684
jmp 0x57b8
movl $0x88, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x436e
jmp 0x57b8
movl $0xa8, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x4dbe
jmp 0x57b8
movq 0xa882(%rip), %rdi      # 0xfff0
leaq 0x5aa1(%rip), %rsi      # 0xb216
callq 0x31a0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x31a0
leaq 0x5d17(%rip), %rsi      # 0xb4a4
movq %rax, %rdi
callq 0x31a0
movq %rax, %rdi
callq 0x30d0
pushq $0x1
popq %r14
jmp 0x57c7
movl $0xa8, %edi
callq 0x31b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x505a
xorl %r14d, %r14d
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x87de
leaq -0x40(%rbp), %rdi
callq 0x30c0
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x57f0
jmp 0x57f0
jmp 0x57f0
jmp 0x57f0
jmp 0x57f0
jmp 0x57f0
jmp 0x57f0
jmp 0x57f0
jmp 0x57f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x3190
jmp 0x58af
movq %rax, %r14
jmp 0x58b8
movq %rdx, %r15
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x30c0
jmp 0x581f
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0x58b8
movq %r14, %rdi
callq 0x31c0
movq 0xa788(%rip), %rax      # 0xffc0
addq $0x10, %rax
movq %rax, -0x40(%rbp)
movq %r14, %rdi
callq 0x30b0
movq 0xa7a1(%rip), %rdi      # 0xfff0
leaq 0x5995(%rip), %rsi      # 0xb1eb
callq 0x31a0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x31a0
leaq 0x5c36(%rip), %rsi      # 0xb4a4
movq %rax, %rdi
callq 0x31a0
movq %rax, %rdi
callq 0x30d0
leaq -0x40(%rbp), %rdi
callq 0x3290
callq 0x3220
jmp 0x5621
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x3290
callq 0x3220
jmp 0x58b8
movq %rax, %rdi
callq 0x5433
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x30c0
movq %r14, %rdi
callq 0x3250