// File: /workspace/github_cpp_makefile_star2_O3/matthewarcus[P]mmps/transform.cpp
// Function: Transform::DoCommands(Image&, TransformParams const&, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>) const
void Transform::DoCommands (Image& image, 
			    const TransformParams& params,
			    const vector<vector<string> > cmdlist) const
{
  CmdParams cmdparams;
  cmdparams.color = params.gridcolor;
  for (size_t i = 0; i < cmdlist.size(); i++) {
    string cmd = cmdlist[i][0];
    if (cmd == "grid") {
      DrawGrid(image,params,cmdparams);
    } else if (cmd == "gridx") {
      cmdparams.gridx = atoi(cmdlist[i][1].c_str());
    } else if (cmd == "gridy") {
      cmdparams.gridy = atoi(cmdlist[i][1].c_str());
    } else if (cmd == "gridoff") {
      cmdparams.gridoff = atoi(cmdlist[i][1].c_str());
    } else if (cmd == "temporaryhours") {
      DrawTemporaryHours(image,params,cmdparams);
    } else if (cmd == "localhours") {
      DrawLocalHours(image,params,cmdparams);
    } else if (cmd == "altitudes") {
      DrawAltitudes(image,params,cmdparams);
    } else if (cmd == "analemma") {
      DrawAnalemma(image,params,cmdparams);
    } else if (cmd == "tropics") {
      DrawTropics(image,params,cmdparams);
    } else if (cmd == "arctics") {
      DrawArctics(image,params,cmdparams);
    } else if (cmd == "dateline") {
      double p = strtod(cmdlist[i][1].c_str(),NULL);
      DrawDateline(image,params,cmdparams, p);
    } else if (cmd == "datetime") {
      double p = strtod(cmdlist[i][1].c_str(),NULL);
      DrawDatetime(image,params,cmdparams, p);
    } else if (cmd == "dlat") {
      double p = strtod(cmdlist[i][1].c_str(),NULL);
      cmdparams.dlat = radians(p);
    } else if (cmd == "dlong") {
      double p = strtod(cmdlist[i][1].c_str(),NULL);
      cmdparams.dlon = radians(p);
    } else if (cmd == "color") {
      cmdparams.color = Rgb(cmdlist[i][1].c_str());
    } else {
      fprintf(stderr,"Unknown command: %s\n", cmd.c_str());
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movabsq $0xa0000000f, %rax      # imm = 0xA0000000F
movq %rax, 0x24(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movb 0xce(%rdx), %al
movb %al, 0x22(%rsp)
movzwl 0xcc(%rdx), %eax
movw %ax, 0x20(%rsp)
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x960b
movq %rcx, %rbx
movq %rdx, %r14
leaq 0x68(%rsp), %rbp
xorl %r15d, %r15d
leaq 0x58(%rsp), %r13
xorl %r12d, %r12d
movq (%rax,%r15), %rax
movq %rbp, 0x58(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xa186
movq %r13, %rdi
leaq 0x412a(%rip), %rsi      # 0xd3a0
callq 0x4090
testl %eax, %eax
je 0x93f1
movq %r13, %rdi
leaq 0x4119(%rip), %rsi      # 0xd3a6
callq 0x4090
testl %eax, %eax
je 0x940d
movq %r13, %rdi
leaq 0x4109(%rip), %rsi      # 0xd3ad
callq 0x4090
testl %eax, %eax
je 0x9426
movq %r13, %rdi
leaq 0x432d(%rip), %rsi      # 0xd5e8
callq 0x4090
testl %eax, %eax
je 0x943f
movq %r13, %rdi
leaq 0x431e(%rip), %rsi      # 0xd5f0
callq 0x4090
testl %eax, %eax
je 0x9461
movq %r13, %rdi
leaq 0x4316(%rip), %rsi      # 0xd5ff
callq 0x4090
testl %eax, %eax
je 0x947d
movq %r13, %rdi
leaq 0x430a(%rip), %rsi      # 0xd60a
callq 0x4090
testl %eax, %eax
je 0x9499
movq %r13, %rdi
leaq 0x42fd(%rip), %rsi      # 0xd614
callq 0x4090
testl %eax, %eax
je 0x94b5
movq %r13, %rdi
leaq 0x42ef(%rip), %rsi      # 0xd61d
callq 0x4090
testl %eax, %eax
je 0x94d1
movq %r13, %rdi
leaq 0x42e0(%rip), %rsi      # 0xd625
callq 0x4090
testl %eax, %eax
je 0x94ed
movq %r13, %rdi
leaq 0x42d1(%rip), %rsi      # 0xd62d
callq 0x4090
testl %eax, %eax
je 0x9509
movq %r13, %rdi
leaq 0x42c3(%rip), %rsi      # 0xd636
callq 0x4090
testl %eax, %eax
je 0x9537
movq %r13, %rdi
leaq 0x42b5(%rip), %rsi      # 0xd63f
callq 0x4090
testl %eax, %eax
je 0x9562
movq %r13, %rdi
leaq 0x42a3(%rip), %rsi      # 0xd644
callq 0x4090
testl %eax, %eax
je 0x9590
movq %r13, %rdi
leaq 0x4000(%rip), %rsi      # 0xd3b8
callq 0x4090
testl %eax, %eax
jne 0x9601
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rsi
leaq 0x1d(%rsp), %rdi
callq 0xb734
movb 0x1f(%rsp), %al
movb %al, 0x22(%rsp)
movzwl 0x1d(%rsp), %eax
movw %ax, 0x20(%rsp)
jmp 0x95bc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x9056
jmp 0x95bc
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
callq 0x42a0
movl %eax, 0x24(%rsp)
jmp 0x95bc
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
callq 0x42a0
movl %eax, 0x28(%rsp)
jmp 0x95bc
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
callq 0x42a0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x30(%rsp)
jmp 0x95bc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x9642
jmp 0x95bc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x96d0
jmp 0x95bc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x9752
jmp 0x95bc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x97e8
jmp 0x95bc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x988e
jmp 0x95bc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x9924
jmp 0x95bc
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4160
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x99ba
jmp 0x95bc
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4160
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x9a80
jmp 0x95bc
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4160
movsd %xmm0, 0x48(%rsp)
fldl 0x48(%rsp)
fmull 0x3a84(%rip)            # 0xd008
fdivs 0x3ae2(%rip)            # 0xd06c
fstpl 0x38(%rsp)
jmp 0x95bc
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4160
movsd %xmm0, 0x50(%rsp)
fldl 0x50(%rsp)
fmull 0x3a56(%rip)            # 0xd008
fdivs 0x3ab4(%rip)            # 0xd06c
fstpl 0x40(%rsp)
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x95d3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4220
incq %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
addq $0x18, %r15
cmpq %rcx, %r12
jb 0x9251
jmp 0x960b
movq %r13, %rdi
callq 0x43e0
jmp 0x95bc
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9620
jmp 0x9620
jmp 0x9620
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x963a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4220
movq %rbx, %rdi
callq 0x4330