// File: /workspace/github_cpp_makefile_star2_O1/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)
movw $0x0, 0x20(%rsp)
movb $0x0, 0x22(%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 0x9355
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 0x9f1c
movq %r13, %rdi
leaq 0x43e0(%rip), %rsi      # 0xd3a0
callq 0x4090
testl %eax, %eax
je 0x913b
movq %r13, %rdi
leaq 0x43cf(%rip), %rsi      # 0xd3a6
callq 0x4090
testl %eax, %eax
je 0x9157
movq %r13, %rdi
leaq 0x43bf(%rip), %rsi      # 0xd3ad
callq 0x4090
testl %eax, %eax
je 0x9170
movq %r13, %rdi
leaq 0x457b(%rip), %rsi      # 0xd580
callq 0x4090
testl %eax, %eax
je 0x9189
movq %r13, %rdi
leaq 0x456c(%rip), %rsi      # 0xd588
callq 0x4090
testl %eax, %eax
je 0x91ab
movq %r13, %rdi
leaq 0x4564(%rip), %rsi      # 0xd597
callq 0x4090
testl %eax, %eax
je 0x91c7
movq %r13, %rdi
leaq 0x4558(%rip), %rsi      # 0xd5a2
callq 0x4090
testl %eax, %eax
je 0x91e3
movq %r13, %rdi
leaq 0x454b(%rip), %rsi      # 0xd5ac
callq 0x4090
testl %eax, %eax
je 0x91ff
movq %r13, %rdi
leaq 0x453d(%rip), %rsi      # 0xd5b5
callq 0x4090
testl %eax, %eax
je 0x921b
movq %r13, %rdi
leaq 0x452e(%rip), %rsi      # 0xd5bd
callq 0x4090
testl %eax, %eax
je 0x9237
movq %r13, %rdi
leaq 0x451f(%rip), %rsi      # 0xd5c5
callq 0x4090
testl %eax, %eax
je 0x9253
movq %r13, %rdi
leaq 0x4511(%rip), %rsi      # 0xd5ce
callq 0x4090
testl %eax, %eax
je 0x9281
movq %r13, %rdi
leaq 0x4503(%rip), %rsi      # 0xd5d7
callq 0x4090
testl %eax, %eax
je 0x92ac
movq %r13, %rdi
leaq 0x44f1(%rip), %rsi      # 0xd5dc
callq 0x4090
testl %eax, %eax
je 0x92da
movq %r13, %rdi
leaq 0x42b6(%rip), %rsi      # 0xd3b8
callq 0x4090
testl %eax, %eax
jne 0x934b
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rsi
leaq 0x1d(%rsp), %rdi
callq 0xb4d0
movb 0x1f(%rsp), %al
movb %al, 0x22(%rsp)
movzwl 0x1d(%rsp), %eax
movw %ax, 0x20(%rsp)
jmp 0x9306
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x8d8c
jmp 0x9306
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
callq 0x42b0
movl %eax, 0x24(%rsp)
jmp 0x9306
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
callq 0x42b0
movl %eax, 0x28(%rsp)
jmp 0x9306
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
callq 0x42b0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x30(%rsp)
jmp 0x9306
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x938c
jmp 0x9306
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x9436
jmp 0x9306
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x94c0
jmp 0x9306
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x956e
jmp 0x9306
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x961c
jmp 0x9306
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x96b2
jmp 0x9306
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4170
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x9748
jmp 0x9306
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4170
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x9816
jmp 0x9306
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4170
movsd %xmm0, 0x48(%rsp)
fldl 0x48(%rsp)
fmull 0x3d3a(%rip)            # 0xd008
fdivs 0x3d98(%rip)            # 0xd06c
fstpl 0x38(%rsp)
jmp 0x9306
movq (%rbx), %rax
movq (%rax,%r15), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x4170
movsd %xmm0, 0x50(%rsp)
fldl 0x50(%rsp)
fmull 0x3d0c(%rip)            # 0xd008
fdivs 0x3d6a(%rip)            # 0xd06c
fstpl 0x40(%rsp)
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x931d
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4230
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 0x8f9b
jmp 0x9355
movq %r13, %rdi
callq 0x43f2
jmp 0x9306
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x936a
jmp 0x936a
jmp 0x936a
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9384
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x4230
movq %rbx, %rdi
callq 0x4340