// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x2, %edi
jg 0x5e4f
movq 0xc1ef(%rip), %rbx      # 0x11ff0
leaq 0x732c(%rip), %rsi      # 0xd134
movl $0x3a, %edx
movq %rbx, %rdi
callq 0x31e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rdi
callq 0x3130
movl $0x1, %r14d
jmp 0x6054
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x30b0
movq -0x50(%rbp), %r12
callq 0x3040
movq %rax, %r15
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl $0x0, (%r15)
leaq -0x58(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x3210
cmpq %r12, (%r13)
je 0x60cf
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0x60db
movl (%r15), %eax
cmpl $0x22, %eax
je 0x60db
testl %eax, %eax
jne 0x5ebe
movl -0x30(%rbp), %eax
movl %eax, (%r15)
leaq -0x40(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x5ed0
callq 0x31a0
movq 0x10(%rbx), %rsi
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x30b0
leal -0x1(%r14), %eax
cmpl $0x9, %eax
ja 0x5fe2
leaq 0x7217(%rip), %rcx      # 0xd10c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x34dc
jmp 0x6037
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x40fe
jmp 0x6037
movl $0xa8, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x5abe
jmp 0x6037
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x39e8
jmp 0x6037
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x3d22
jmp 0x6037
movl $0xa8, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x551a
jmp 0x6037
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x374c
jmp 0x6037
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x4606
jmp 0x6037
movl $0xa8, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x5248
jmp 0x6037
movq 0xc007(%rip), %r14      # 0x11ff0
leaq 0x71aa(%rip), %rsi      # 0xd19a
movl $0x2a, %edx
movq %r14, %rdi
callq 0x31e0
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x6066
movq %rbx, %rdi
callq 0x30d0
movq 0xbfdb(%rip), %rdi      # 0x11ff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x31e0
jmp 0x607e
movl $0xa8, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x57ec
xorl %r14d, %r14d
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0xa45c
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x6054
callq 0x31a0
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x32a0
movq 0xbf6b(%rip), %rbx      # 0x11ff0
leaq 0x73a4(%rip), %rsi      # 0xd430
movl $0x1, %edx
movq %rbx, %rdi
callq 0x31e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq 0xbf39(%rip), %rdi      # 0x11ff0
callq 0x3030
movl $0x1, %r14d
movq %rax, %rdi
callq 0x3130
jmp 0x6046
leaq 0x70ef(%rip), %rdi      # 0xd1c5
callq 0x3110
leaq 0x70e3(%rip), %rdi      # 0xd1c5
callq 0x3220
jmp 0x60f9
jmp 0x60f9
jmp 0x60f9
jmp 0x60f9
jmp 0x60f9
jmp 0x60f9
jmp 0x60f9
jmp 0x60f9
jmp 0x60f9
movq %rax, %r14
movq %rbx, %rdi
callq 0x31a0
jmp 0x61de
movq %rax, %r14
jmp 0x61ec
movq %rdx, %r12
movq %rax, %r14
jmp 0x613d
movq %rdx, %r12
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x612b
movl -0x30(%rbp), %eax
movl %eax, (%r15)
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x613d
callq 0x31a0
cmpl $0x1, %r12d
jne 0x61ec
movq %r14, %rdi
callq 0x31f0
movq 0xbe72(%rip), %rax      # 0x11fc8
addq $0x10, %rax
movq %rax, -0x50(%rbp)
movq %r14, %rdi
callq 0x30c0
movq 0xbe83(%rip), %rdi      # 0x11ff0
leaq 0x6ffb(%rip), %rsi      # 0xd16f
movl $0x2a, %edx
callq 0x31e0
movq 0x8(%rbx), %rsi
movq 0xbe67(%rip), %rdi      # 0x11ff0
callq 0x31c0
movq %rax, %rbx
leaq 0x7298(%rip), %rsi      # 0xd430
movl $0x1, %edx
movq %rax, %rdi
callq 0x31e0
movq %rbx, %rdi
callq 0x30e0
leaq -0x50(%rbp), %rdi
callq 0x32f0
callq 0x3270
jmp 0x5e44
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x32f0
callq 0x3270
jmp 0x61ec
movq %rax, %rdi
callq 0x61f4
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x61ec
callq 0x31a0
movq %r14, %rdi
callq 0x32b0