// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/main.cpp
// Function: main
int main(int argc, char *argv[])
{
string InputFileName;
string OutputFileName;
double MinCutDistance = 1.0;
double StepAngle = 0;
double rect_cost = 0.0;
int Flag_file = 0;
int debug_level = 0;
int Output_Layer = 0;
int KeepNested = 1;
int OptimizingLevel = 1;
int FirstPos = CenterCenter;
int UseCache = 0;
bool Flag_free_rot = 1;
string debug_file_name = "Debug_CutOptim.txt";

double max_segment_length = 1000.0;
#ifdef UNDEF
        //  Used to check param passing from inkscape
        ofstream ParamDbg("/home/thierry/Programmes/CutOptim/DebgParam.txt");
        if ( ParamDbg.is_open() == false )
        {
            cerr << "unable to open /home/thierry/Programmes/CutOptim/DebgParam.txt\n";
            exit(1);
        }
         ParamDbg << "--- Params  ------\n";
        ParamDbg << " argc =" << argc << "\n";
        for ( int i = 0; i < argc; i++)
        {
            ParamDbg << "Argv[" << i << "]=" << argv[i] << "\n";
        }
        ParamDbg.close();
#endif
    auto result = parse(argc, argv);
    InputFileName = result["f"].as<std::string>();
    if (result.count("output"))
    {
        OutputFileName = result["output"].as<std::string>();
        Flag_file = 1;
    }
    if (result.count("distance"))
        MinCutDistance = result["distance"].as<double>();
    if (result.count("angle"))
    {
        StepAngle = result["angle"].as<double>();
        Flag_free_rot = 0;
    }
    if (result.count("max_length"))
        max_segment_length = result["max_length"].as<double>();
    if (result.count("rect_cost"))
        rect_cost = result["rect_cost"].as<double>();
    if (result.count("debug_level"))
        debug_level = result["debug_level"].as<int>();
    if (result.count("layer_output"))
        Output_Layer = result["layer_output"].as<int>();
    if (result.count("optimizing_level"))
        OptimizingLevel = result["optimizing_level"].as<int>();
    if (result.count("original"))
    {
        Output_Layer |= result["original"].as<bool>();
    }
    if ( result.count("firstpos"))
    {
        FirstPos = ConvertPos(result["firstpos"].as<string>() );
    }
    if ( result.count("df_name"))
    {
        debug_file_name = result["df_name"].as<string>();
    }
    if (result.count("nested"))
    {
        KeepNested = result["nested"].as<bool>();
    }

    if (result.count("use_cache"))
    {
        UseCache = result["use_cache"].as<bool>();
    }

    if (result.count("free_rot"))
    {
        Flag_free_rot = result["free_rot"].as<bool>();
    }
    if (result.count("debug_file"))
        debug_level += result["debug_file"].as<bool>();;
    if ( Flag_file )
    {
        cout << "Parse options complete" << endl;
        cout << "Input File = " << InputFileName << std::endl;
        cout << "Output File = " << OutputFileName << std::endl;
        cout << "angle = " << StepAngle << std::endl;
        cout << "MinCutDistance = " << MinCutDistance << std::endl;
        cout << "Debug Level = " << debug_level << std::endl;
        cout << "Output layers = " << Output_Layer << std::endl;
        cout << "Optimizing level = " << OptimizingLevel << std::endl;
        cout << "Max_segment_length = " << max_segment_length << std::endl;
        cout << "Use free rotation = " << Flag_free_rot << std::endl;
        cout << "Rectangle cost factor = " << rect_cost << std::endl;
        cout << "Keep nested paths = " << KeepNested << std::endl;
        cout << "Use Cache = " << UseCache << std::endl;
    }

      //    Read and process input file

    SvgDoc InputSVG(InputFileName);
    InputSVG.setDebugLevel(debug_level, debug_file_name);
    InputSVG.setUseCache(UseCache);
    InputSVG.setRectCost(rect_cost);
    if ( InputSVG.SvgData == NULL )
    {
    cerr << " No input to process aborting \n";
    return 1;
    }
    //    Change paths to polygones
    InputSVG.TransformPaths(MinCutDistance / 10.0, KeepNested);
    //    Make larger polygons
    InputSVG.EnlargePaths(MinCutDistance);
    //  Break longer edges if necessary
    InputSVG.BreakLongerEdges(max_segment_length, MinCutDistance / 10.0);
    //    Sort polygons by area
    InputSVG.BuilSingleListPath();
      //    Compute convex hulls of each path
      //  InputSVG.ComputeConvexHulls();
      //    Optimize
    if ( StepAngle == 0 ) StepAngle = 360;
    if ( Flag_free_rot )
        InputSVG.OptimizeFreeRot(OptimizingLevel, FirstPos, Flag_file);
    else
        InputSVG.Optimize(StepAngle * 2 * M_PI / 360, OptimizingLevel, FirstPos, Flag_file);
    InputSVG.WriteDoc(OutputFileName, Flag_file, Output_Layer);


#ifdef TEST_GEO
      //    Now test distance from point to Segment
      Point P00 = Point(0,0);
      Point P11 = Point(1,1);
      Segment Seg1 = Segment(P00, P11);
      Point P01 = Point(0, 1);
      Point P10 = Point(1, 0);
      printf("Distance from P10 to Seg1 =%.3f\n", sqrt(Seg1.sqrDistancePoint(P10)));
      printf("Distance from P01 to Seg1 =%.3f\n", sqrt(Seg1.sqrDistancePoint(P01)));
      Point P2 = Point(2,0);
      printf("Distance from P2 to Seg1 =%.3f\n", sqrt(Seg1.sqrDistancePoint(P2)));
      Point P3 = Point(-1,-1);
      printf("Distance from P3 to Seg1 =%.3f\n", sqrt(Seg1.sqrDistancePoint(P3)));
      Point P4 = Point(2,2);
      printf("Distance from P4 to Seg1 =%.3f\n", sqrt(Seg1.sqrDistancePoint(P4)));
      Point P5 = Point(-1,0);
      printf("Distance from P5 to Seg1 =%.3f\n", sqrt(Seg1.sqrDistancePoint(P5)));
      Segment Seg2 = Segment(P11, P00);
      printf("Distance from P1 to Seg2 =%.3f\n", sqrt(Seg2.sqrDistancePoint(P10)));
      printf("Distance from P2 to Seg2 =%.3f\n", sqrt(Seg2.sqrDistancePoint(P2)));
      printf("Distance from P3 to Seg2 =%.3f\n", sqrt(Seg2.sqrDistancePoint(P3)));
      printf("Distance from P4 to Seg2 =%.3f\n", sqrt(Seg2.sqrDistancePoint(P4)));
      printf("Distance from P5 to Seg2 =%.3f\n", sqrt(Seg2.sqrDistancePoint(P5)));

      //    Test Polygons
      Polygon Poly1 = Polygon();
      Polygon Poly2 = Polygon();
      //    First a rectangle
      Poly1.addVertice(P00);
      Poly1.addVertice(P01);
      Poly1.addVertice(P11);
      Poly1.addVertice(P10);
      Poly1.addVertice(P00);
      printf("Polygon 1 nVertices = %d clockwise =%d, area = %.3f\n", Poly1.nVertices, Poly1.isClockWise(), Poly1.area());

      Poly2.addVertice(P00);
      Poly2.addVertice(P10);
      Poly2.addVertice(P11);
      Poly2.addVertice(P01);
      Poly2.addVertice(P00);
      printf("Polygon 2 nVertices = %d clockwise =%d, area = %.3f\n", Poly2.nVertices, Poly2.isClockWise(), Poly2.area());
      printf("Distance P01 to Poly2 =%.3f\n", sqrt(Poly2.distance(P01)));
      printf("Distance P10 to Poly2 =%.3f\n", sqrt(Poly2.distance(P10)));
      printf("Distance P2 to Poly2 =%.3f\n", sqrt(Poly2.distance(P2)));
      printf("Distance P3 to Poly2 =%.3f\n", sqrt(Poly2.distance(P3)));
      printf("Distance P4 to Poly2 =%.3f\n", sqrt(Poly2.distance(P4)));
      printf("Distance P5 to Poly2 =%.3f\n", sqrt(Poly2.distance(P5)));

      Polygon Poly8 = Polygon();
      for (int i = 0; i <= 8; i++)
      {
        Point p = Point(cos(i*M_PI/4.0), sin(i*M_PI/4.0));
        Poly8.addVertice(p);
      }
      printf("Polygon 8 nVertices = %d clockwise =%d, area = %.3f\n", Poly8.nVertices, Poly8.isClockWise(), Poly8.area());

      printf("Distance P01 to Poly8 =%.3f\n", sqrt(Poly8.distance(P01)));
      printf("Distance P10 to Poly8 =%.3f\n", sqrt(Poly8.distance(P10)));
      printf("Distance P2 to Poly8 =%.3f\n", sqrt(Poly8.distance(P2)));
      printf("Distance P3 to Poly8 =%.3f\n", sqrt(Poly8.distance(P3)));
      printf("Distance P4 to Poly8 =%.3f\n", sqrt(Poly8.distance(P4)));
      printf("Distance P5 to Poly8 =%.3f\n", sqrt(Poly8.distance(P5)));
#endif
#if TEST_ANGLES > 0
    printf("Cas 1 : Départ en -1,0, arrivée en 0,0,  puis va en 0,1\n");
    double sf1 = atan2(-1, 0);
    double sf2 = atan2(-0.2, -1);

    if ( sf1 < 0 ) sf1 += 2*M_PI;
    if ( sf2 < 0 ) sf2 += 2*M_PI;
    double sm2 = 0;
    printf("sf1 = %.1f, sf2 = %.1f\n", sf1 * 180 / M_PI, sf2 *180.0 / M_PI);

    printf("Essai sm1 sm2\n");

    sm2 = 0;
    for ( double a = 1.0; a < 360; a+= 20.0)
    {
        sm2 = a/180.0 * M_PI;
        printf("Angle %.1f, SM1 %d  SM2 %d\n", a, CheckOKAngles(sf1, sf2, sm2), CheckOKAngles(sf2, sf1, sm2));
    }
#endif
      return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x328(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x308(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x29943(%rip), %rsi     # 0x34446
leaq 0x3f8(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x8b6c
leaq 0x2d231(%rip), %rsi     # 0x37d5f
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc280
leaq 0x318(%rsp), %rdi
movq %rax, %rsi
callq 0x8270
leaq 0x40(%rsp), %rdi
callq 0x8858
leaq 0x29714(%rip), %rsi     # 0x3428c
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %r14, %r14
je 0xabfe
leaq 0x296da(%rip), %rsi     # 0x3428c
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc280
leaq 0x2f8(%rsp), %rdi
movq %rax, %rsi
callq 0x8270
pushq $0x1
popq %rax
movl %eax, 0x24(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xac06
movl $0x0, 0x24(%rsp)
leaq 0x296d6(%rip), %rsi     # 0x342e3
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xac86
leaq 0x2969c(%rip), %rsi     # 0x342e3
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc306
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xac94
movsd 0x2937a(%rip), %xmm0    # 0x34008
movsd %xmm0, 0x28(%rsp)
leaq 0x298db(%rip), %rsi     # 0x34576
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xad1c
leaq 0x298a1(%rip), %rsi     # 0x34576
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc306
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x8858
movl $0x0, 0x14(%rsp)
jmp 0xad2c
movb $0x1, %al
movl %eax, 0x14(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
leaq 0x29607(%rip), %rsi     # 0x3433a
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xadac
leaq 0x295cd(%rip), %rsi     # 0x3433a
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc306
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xadba
movsd 0x2925c(%rip), %xmm0    # 0x34010
movsd %xmm0, 0x38(%rsp)
leaq 0x29556(%rip), %rsi     # 0x34317
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xae3a
leaq 0x2951c(%rip), %rsi     # 0x34317
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc306
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xae44
xorpd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x29577(%rip), %rsi     # 0x343c2
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xaebd
leaq 0x2953d(%rip), %rsi     # 0x343c2
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc38c
movl (%rax), %r15d
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xaec0
xorl %r15d, %r15d
leaq 0x2960b(%rip), %rsi     # 0x344d2
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xaf38
leaq 0x295d1(%rip), %rsi     # 0x344d2
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc38c
movl (%rax), %ebp
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xaf3a
xorl %ebp, %ebp
leaq 0x2943a(%rip), %rsi     # 0x3437b
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xafb6
leaq 0x29400(%rip), %rsi     # 0x3437b
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc38c
movl (%rax), %eax
movl %eax, 0x10(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xafbd
pushq $0x1
popq %rax
movl %eax, 0x10(%rsp)
leaq 0x29497(%rip), %rsi     # 0x3445b
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xb036
leaq 0x2945d(%rip), %rsi     # 0x3445b
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc412
movzbl (%rax), %eax
orl %eax, %ebp
leaq 0x40(%rsp), %rdi
callq 0x8858
leaq 0x29573(%rip), %rsi     # 0x345b0
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xb109
leaq 0x29535(%rip), %rsi     # 0x345b0
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc280
leaq 0x438(%rsp), %rdi
movq %rax, %rsi
callq 0x85c0
movl $0x0, 0xc(%rsp)
cmpq $0x2, 0x440(%rsp)
jb 0xb15c
movq 0x438(%rsp), %rcx
movzbl (%rcx), %edx
movl $0x0, 0xc(%rsp)
pushq $0x8
popq %rsi
cmpl $0x42, %edx
je 0xb112
movl $0x0, %eax
cmpl $0x74, %edx
je 0xb114
cmpl $0x54, %edx
je 0xb114
cmpl $0x62, %edx
je 0xb112
pushq $0x4
popq %rax
cmpl $0x63, %edx
je 0xb114
cmpl $0x43, %edx
je 0xb114
jmp 0xb15c
pushq $0x5
popq %rax
movl %eax, 0xc(%rsp)
jmp 0xb173
movl %esi, %eax
movzbl 0x1(%rcx), %ecx
addl $-0x43, %ecx
cmpl $0x2f, %ecx
ja 0xb15c
movabsq $0x100000001, %rdx      # imm = 0x100000001
btq %rcx, %rdx
jb 0xb155
movabsq $0x20000000200, %rdx    # imm = 0x20000000200
btq %rcx, %rdx
jb 0xb158
movabsq $0x800000008000, %rdx   # imm = 0x800000008000
btq %rcx, %rdx
jae 0xb15c
orl $0x2, %eax
jmp 0xb158
orl $0x1, %eax
movl %eax, 0xc(%rsp)
leaq 0x438(%rsp), %rdi
callq 0x8858
leaq 0x40(%rsp), %rdi
callq 0x8858
leaq 0x292b1(%rip), %rsi     # 0x3442b
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xb1f7
leaq 0x29277(%rip), %rsi     # 0x3442b
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc280
leaq 0x3f8(%rsp), %rdi
movq %rax, %rsi
callq 0x8270
leaq 0x40(%rsp), %rdi
callq 0x8858
leaq 0x29284(%rip), %rsi     # 0x34482
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %rbx, %rbx
je 0xb270
leaq 0x2924a(%rip), %rsi     # 0x34482
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc412
movzbl (%rax), %ebx
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xb273
pushq $0x1
popq %rbx
leaq 0x2922b(%rip), %rsi     # 0x344a5
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %r12
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %r12, %r12
je 0xb2ed
leaq 0x291f1(%rip), %rsi     # 0x344a5
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc412
movzbl (%rax), %r12d
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xb2f0
xorl %r12d, %r12d
leaq 0x2929a(%rip), %rsi     # 0x34591
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %r13
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %r13, %r13
je 0xb36a
leaq 0x29260(%rip), %rsi     # 0x34591
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc412
movb (%rax), %al
movl %eax, 0x14(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x8858
leaq 0x29088(%rip), %rsi     # 0x343f9
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbf68
movq %rax, %r13
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %r13, %r13
je 0xb3e4
leaq 0x2904e(%rip), %rsi     # 0x343f9
leaq 0x40(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xb8be
leaq 0x338(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc20a
movq %rax, %rdi
callq 0xc412
movzbl (%rax), %eax
addl %eax, %r15d
leaq 0x40(%rsp), %rdi
callq 0x8858
testq %r14, %r14
je 0xb5e7
movq 0x41ba4(%rip), %rdi     # 0x4cf98
leaq 0x29219(%rip), %rsi     # 0x34614
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq 0x41b89(%rip), %rdi     # 0x4cf98
leaq 0x29215(%rip), %rsi     # 0x3462b
callq 0x8420
leaq 0x318(%rsp), %rsi
movq %rax, %rdi
callq 0x83d0
movq %rax, %rdi
callq 0x8200
movq 0x41b5e(%rip), %rdi     # 0x4cf98
leaq 0x291f8(%rip), %rsi     # 0x34639
callq 0x8420
leaq 0x2f8(%rsp), %rsi
movq %rax, %rdi
callq 0x83d0
movq %rax, %rdi
callq 0x8200
movq 0x41b33(%rip), %rdi     # 0x4cf98
leaq 0x291dc(%rip), %rsi     # 0x34648
callq 0x8420
movq %rax, %rdi
movsd 0x30(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
callq 0x8200
movq 0x41b0a(%rip), %rdi     # 0x4cf98
leaq 0x291bc(%rip), %rsi     # 0x34651
callq 0x8420
movq %rax, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
callq 0x8200
movq 0x41ae1(%rip), %rdi     # 0x4cf98
leaq 0x291a5(%rip), %rsi     # 0x34663
callq 0x8420
movq %rax, %rdi
movl %r15d, %esi
callq 0x8740
movq %rax, %rdi
callq 0x8200
movq 0x41abb(%rip), %rdi     # 0x4cf98
leaq 0x2918e(%rip), %rsi     # 0x34672
callq 0x8420
movq %rax, %rdi
movl %ebp, %esi
callq 0x8740
movq %rax, %rdi
callq 0x8200
movq 0x41a96(%rip), %rdi     # 0x4cf98
leaq 0x2917a(%rip), %rsi     # 0x34683
callq 0x8420
movq %rax, %rdi
movl 0x10(%rsp), %esi
callq 0x8740
movq %rax, %rdi
callq 0x8200
movq 0x41a6f(%rip), %rdi     # 0x4cf98
leaq 0x29167(%rip), %rsi     # 0x34697
callq 0x8420
movq %rax, %rdi
movsd 0x38(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
callq 0x8200
movq 0x41a46(%rip), %rdi     # 0x4cf98
leaq 0x29154(%rip), %rsi     # 0x346ad
callq 0x8420
movzbl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x8700
movq %rax, %rdi
callq 0x8200
movq 0x41a1e(%rip), %rdi     # 0x4cf98
leaq 0x29141(%rip), %rsi     # 0x346c2
callq 0x8420
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
callq 0x8200
movq 0x419f5(%rip), %rdi     # 0x4cf98
leaq 0x29131(%rip), %rsi     # 0x346db
callq 0x8420
movq %rax, %rdi
movl %ebx, %esi
callq 0x8740
movq %rax, %rdi
callq 0x8200
movq 0x419d0(%rip), %rdi     # 0x4cf98
leaq 0x29121(%rip), %rsi     # 0x346f0
callq 0x8420
movq %rax, %rdi
movl %r12d, %esi
callq 0x8740
movq %rax, %rdi
callq 0x8200
leaq 0x40(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x28e6e
movl 0x24(%rsp), %r14d
leaq 0x418(%rsp), %rdi
leaq 0x3f8(%rsp), %rsi
callq 0x85c0
leaq 0x40(%rsp), %rdi
leaq 0x418(%rsp), %rdx
movl %r15d, %esi
callq 0xc498
leaq 0x418(%rsp), %rdi
callq 0x8858
movl %r12d, 0xa4(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x78(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0xb6bf
movsd 0x28(%rsp), %xmm0
divsd 0x289b9(%rip), %xmm0    # 0x34018
leaq 0x40(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
movl %ebx, %esi
callq 0x276b8
leaq 0x40(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
callq 0x2890c
leaq 0x40(%rsp), %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x28be0
leaq 0x40(%rsp), %rdi
callq 0x2a84e
cmpb $0x0, 0x14(%rsp)
je 0xb6d7
leaq 0x40(%rsp), %rdi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %edx
movl %r14d, %ecx
callq 0x2dd0c
jmp 0xb727
movq 0x41922(%rip), %rdi     # 0x4cfe8
leaq 0x29030(%rip), %rsi     # 0x346fd
callq 0x8420
pushq $0x1
popq %rbx
jmp 0xb740
movsd 0x30(%rsp), %xmm2
movapd %xmm2, %xmm1
addsd %xmm2, %xmm1
mulsd 0x28933(%rip), %xmm1    # 0x34020
divsd 0x28933(%rip), %xmm1    # 0x34028
xorpd %xmm0, %xmm0
cmpeqsd %xmm2, %xmm0
movsd 0x2892a(%rip), %xmm2    # 0x34030
andpd %xmm0, %xmm2
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
leaq 0x40(%rsp), %rdi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %edx
movl %r14d, %ecx
callq 0x2ac44
xorl %ebx, %ebx
leaq 0x40(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x2a776
leaq 0x40(%rsp), %rdi
callq 0x28f96
leaq 0x338(%rsp), %rdi
callq 0xc16e
leaq 0x3f8(%rsp), %rdi
callq 0x8858
leaq 0x2f8(%rsp), %rdi
callq 0x8858
leaq 0x318(%rsp), %rdi
callq 0x8858
movl %ebx, %eax
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
jmp 0xb87e
movq %rax, %rbx
leaq 0x418(%rsp), %rdi
callq 0x8858
jmp 0xb872
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb860
jmp 0xb87e
jmp 0xb87e
movq %rax, %rbx
jmp 0xb88e
movq %rax, %rbx
jmp 0xb89b
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
jmp 0xb860
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8858
jmp 0xb881
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x28f96
jmp 0xb881
movq %rax, %rbx
leaq 0x338(%rsp), %rdi
callq 0xc16e
leaq 0x3f8(%rsp), %rdi
callq 0x8858
leaq 0x2f8(%rsp), %rdi
callq 0x8858
leaq 0x318(%rsp), %rdi
callq 0x8858
movq %rbx, %rdi
callq 0x8770
nop