// File: /workspace/github_cpp_makefile_star2_O2/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 $0x68, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, (%rsp)
movq %rdi, %r12
movabsq $0xa0000000f, %rax      # imm = 0xA0000000F
leaq 0x10(%rsp), %rcx
movq %rax, 0x4(%rcx)
andq $0x0, 0x20(%rcx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rcx)
movzwl 0xcc(%rdx), %eax
movw %ax, (%rcx)
movb 0xce(%rdx), %al
movb %al, 0x2(%rcx)
leaq 0x48(%rsp), %rbp
xorl %r13d, %r13d
xorl %r15d, %r15d
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %rax, %r15
jae 0x8c3e
movq (%rcx,%r13), %rsi
movq %rbp, %rdi
callq 0x4280
movq %rbp, %rdi
leaq 0x3a81(%rip), %rsi      # 0xc3a0
callq 0x933f
testb %al, %al
je 0x8941
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x870a
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3a5b(%rip), %rsi      # 0xc3a6
callq 0x933f
testb %al, %al
je 0x896d
movq (%rbx), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rdi
callq 0x42d0
movl %eax, 0x14(%rsp)
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3a36(%rip), %rsi      # 0xc3ad
callq 0x933f
testb %al, %al
je 0x8999
movq (%rbx), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rdi
callq 0x42d0
movl %eax, 0x18(%rsp)
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3c05(%rip), %rsi      # 0xc5a8
callq 0x933f
testb %al, %al
je 0x89cb
movq (%rbx), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rdi
callq 0x42d0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3bdb(%rip), %rsi      # 0xc5b0
callq 0x933f
testb %al, %al
je 0x89f7
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x8c68
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3bbe(%rip), %rsi      # 0xc5bf
callq 0x933f
testb %al, %al
je 0x8a23
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x8cfa
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3b9d(%rip), %rsi      # 0xc5ca
callq 0x933f
testb %al, %al
je 0x8a4f
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x8d84
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3b7b(%rip), %rsi      # 0xc5d4
callq 0x933f
testb %al, %al
je 0x8a7b
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x8e24
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3b58(%rip), %rsi      # 0xc5dd
callq 0x933f
testb %al, %al
je 0x8aa7
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x8ed8
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3b34(%rip), %rsi      # 0xc5e5
callq 0x933f
testb %al, %al
je 0x8ad3
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x8f6c
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3b10(%rip), %rsi      # 0xc5ed
callq 0x933f
testb %al, %al
je 0x8b11
movq (%rbx), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4170
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x9000
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3adb(%rip), %rsi      # 0xc5f6
callq 0x933f
testb %al, %al
je 0x8b4f
movq (%rbx), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4170
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
leaq 0x10(%rsp), %rcx
callq 0x90b0
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3aa6(%rip), %rsi      # 0xc5ff
callq 0x933f
testb %al, %al
je 0x8b90
movq (%rbx), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4170
movsd %xmm0, 0x38(%rsp)
fldl 0x38(%rsp)
fmull 0x3484(%rip)            # 0xc008
fdivs 0x34e2(%rip)            # 0xc06c
fstpl 0x28(%rsp)
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x3a6a(%rip), %rsi      # 0xc604
callq 0x933f
testb %al, %al
je 0x8bd1
movq (%rbx), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4170
movsd %xmm0, 0x40(%rsp)
fldl 0x40(%rsp)
fmull 0x3443(%rip)            # 0xc008
fdivs 0x34a1(%rip)            # 0xc06c
fstpl 0x30(%rsp)
jmp 0x8c0b
movq %rbp, %rdi
leaq 0x37dd(%rip), %rsi      # 0xc3b8
callq 0x933f
testb %al, %al
je 0x8c1f
movq (%rbx), %rax
movq (%rax,%r13), %rax
movq 0x20(%rax), %rsi
leaq 0xd(%rsp), %rdi
callq 0xa904
movb 0xf(%rsp), %al
movb %al, 0x12(%rsp)
movzwl 0xd(%rsp), %eax
movw %ax, 0x10(%rsp)
movq %rbp, %rdi
callq 0x40e0
incq %r15
addq $0x18, %r13
jmp 0x88ee
movq 0x93ba(%rip), %rax      # 0x11fe0
movq (%rax), %rdi
movq 0x48(%rsp), %rdx
leaq 0x39d5(%rip), %rsi      # 0xc60a
xorl %eax, %eax
callq 0x42b0
jmp 0x8c0b
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8c53
jmp 0x8c53
jmp 0x8c53
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x40e0
movq %rbx, %rdi
callq 0x4360