// File: /workspace/github_cpp_makefile_star2_O1/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 0x5e33
movq 0xc20b(%rip), %rbx      # 0x11ff0
leaq 0x7348(%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 0x6038
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 0x60b3
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0x60bf
movl (%r15), %eax
cmpl $0x22, %eax
je 0x60bf
testl %eax, %eax
jne 0x5ea2
movl -0x30(%rbp), %eax
movl %eax, (%r15)
leaq -0x40(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x5eb4
callq 0x31a0
movq 0x10(%rbx), %rsi
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x30b0
leal -0x1(%r14), %eax
cmpl $0x9, %eax
ja 0x5fc6
leaq 0x7233(%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 0x601b
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x40fe
jmp 0x601b
movl $0xa8, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x5aaa
jmp 0x601b
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x39e8
jmp 0x601b
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x3d22
jmp 0x601b
movl $0xa8, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x5506
jmp 0x601b
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x374c
jmp 0x601b
movl $0x88, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x4606
jmp 0x601b
movl $0xa8, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x5234
jmp 0x601b
movq 0xc023(%rip), %r14      # 0x11ff0
leaq 0x71c6(%rip), %rsi      # 0xd19a
movl $0x2a, %edx
movq %r14, %rdi
callq 0x31e0
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x604a
movq %rbx, %rdi
callq 0x30d0
movq 0xbff7(%rip), %rdi      # 0x11ff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x31e0
jmp 0x6062
movl $0xa8, %edi
callq 0x31d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x57d8
xorl %r14d, %r14d
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0xa5a2
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x6038
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 0xbf87(%rip), %rbx      # 0x11ff0
leaq 0x73c0(%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 0xbf55(%rip), %rdi      # 0x11ff0
callq 0x3030
movl $0x1, %r14d
movq %rax, %rdi
callq 0x3130
jmp 0x602a
leaq 0x710b(%rip), %rdi      # 0xd1c5
callq 0x3110
leaq 0x70ff(%rip), %rdi      # 0xd1c5
callq 0x3220
jmp 0x60dd
jmp 0x60dd
jmp 0x60dd
jmp 0x60dd
jmp 0x60dd
jmp 0x60dd
jmp 0x60dd
jmp 0x60dd
jmp 0x60dd
movq %rax, %r14
movq %rbx, %rdi
callq 0x31a0
jmp 0x61c2
movq %rax, %r14
jmp 0x61d0
movq %rdx, %r12
movq %rax, %r14
jmp 0x6121
movq %rdx, %r12
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x610f
movl -0x30(%rbp), %eax
movl %eax, (%r15)
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6121
callq 0x31a0
cmpl $0x1, %r12d
jne 0x61d0
movq %r14, %rdi
callq 0x31f0
movq 0xbe8e(%rip), %rax      # 0x11fc8
addq $0x10, %rax
movq %rax, -0x50(%rbp)
movq %r14, %rdi
callq 0x30c0
movq 0xbe9f(%rip), %rdi      # 0x11ff0
leaq 0x7017(%rip), %rsi      # 0xd16f
movl $0x2a, %edx
callq 0x31e0
movq 0x8(%rbx), %rsi
movq 0xbe83(%rip), %rdi      # 0x11ff0
callq 0x31c0
movq %rax, %rbx
leaq 0x72b4(%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 0x5e28
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x32f0
callq 0x3270
jmp 0x61d0
movq %rax, %rdi
callq 0x61d8
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x61d0
callq 0x31a0
movq %r14, %rdi
callq 0x32b0