// File: awbrenn[P]robot-controller/Client.cpp
// Function: createVector(int, int)
void createVector(int len, int num)
{
   angleFirst =  M_PI - ((M_PI * (num - 2)) / num);
   angleSecond = M_PI - ((M_PI * (num - 3)) / (num - 1));
   char turnFirst[20];
   sprintf(turnFirst, "TURN %f%s", angleFirst, "\0");
   char moveFirst[20];
   sprintf(moveFirst, "MOVE %d%s", len, "\0");
 
   for (int i=0; i<num; i++)
   {
      shape1.push_back(moveFirst);
      shape1.push_back("STOP\0");
//      shape1.push_back("GET IMAGE\O");
      shape1.push_back("GET DGPS\0");
      shape1.push_back("GET GPS\0");
      shape1.push_back("GET LASERS\0");
      shape1.push_back(turnFirst);
      shape1.push_back("STOP\0");
   }

   char turnSecond[20];
   sprintf(turnSecond, "TURN -%f%s", angleSecond, "\0");
   char moveSecond[20];
   sprintf(moveSecond, "MOVE %d%s", len, "\0");
   
   for (int j=0; j<num-1; j++)
   {
      shape2.push_back(moveSecond);
      shape2.push_back("STOP\0");
//      shape2.push_back("GET IMAGE\O");
      shape2.push_back("GET DGPS\0");
      shape2.push_back("GET GPS\0");
      shape2.push_back("GET LASERS\0");
      shape2.push_back(turnSecond);
      shape2.push_back("STOP\0");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x330, %rsp            # imm = 0x330
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %eax
subl $0x2, %eax
cvtsi2sd %eax, %xmm0
movsd 0x3215(%rip), %xmm1     # 0x6018
mulsd %xmm0, %xmm1
cvtsi2sdl -0x8(%rbp), %xmm0
divsd %xmm0, %xmm1
movsd 0x3200(%rip), %xmm0     # 0x6018
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfa728(%rip)    # 0xfd550
movl -0x8(%rbp), %eax
subl $0x3, %eax
cvtsi2sd %eax, %xmm0
movsd 0x31de(%rip), %xmm1     # 0x6018
mulsd %xmm0, %xmm1
movl -0x8(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movsd 0x31c4(%rip), %xmm0     # 0x6018
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfa6f0(%rip)    # 0xfd554
leaq -0x20(%rbp), %rdi
movss 0xfa6e0(%rip), %xmm0    # 0xfd550
cvtss2sd %xmm0, %xmm0
leaq 0x329d(%rip), %rsi      # 0x6118
leaq 0x33e8(%rip), %rdx      # 0x626a
movb $0x1, %al
callq 0x2090
leaq -0x40(%rbp), %rdi
movl -0x4(%rbp), %edx
leaq 0x328b(%rip), %rsi      # 0x6122
leaq 0x33cc(%rip), %rcx      # 0x626a
movb $0x0, %al
callq 0x2090
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x32b0
leaq -0x69(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x23e0
movq -0x2c8(%rbp), %rdx
leaq -0x68(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3ef0
jmp 0x2ede
leaq 0x6393(%rip), %rdi      # 0x9278
leaq -0x68(%rbp), %rsi
callq 0x4160
jmp 0x2ef0
leaq -0x68(%rbp), %rdi
callq 0x2448
leaq -0x69(%rbp), %rdi
callq 0x2250
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x23e0
movq -0x2d0(%rbp), %rdx
leaq 0x3349(%rip), %rsi      # 0x626c
leaq -0xa0(%rbp), %rdi
callq 0x3ef0
jmp 0x2f31
leaq 0x6340(%rip), %rdi      # 0x9278
leaq -0xa0(%rbp), %rsi
callq 0x4160
jmp 0x2f46
leaq -0xa0(%rbp), %rdi
callq 0x2448
leaq -0xa1(%rbp), %rdi
callq 0x2250
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x23e0
movq -0x2d8(%rbp), %rdx
leaq 0x32f3(%rip), %rsi      # 0x6272
leaq -0xc8(%rbp), %rdi
callq 0x3ef0
jmp 0x2f8d
leaq 0x62e4(%rip), %rdi      # 0x9278
leaq -0xc8(%rbp), %rsi
callq 0x4160
jmp 0x2fa2
leaq -0xc8(%rbp), %rdi
callq 0x2448
leaq -0xc9(%rbp), %rdi
callq 0x2250
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x23e0
movq -0x2e0(%rbp), %rdx
leaq 0x32a1(%rip), %rsi      # 0x627c
leaq -0xf0(%rbp), %rdi
callq 0x3ef0
jmp 0x2fe9
leaq 0x6288(%rip), %rdi      # 0x9278
leaq -0xf0(%rbp), %rsi
callq 0x4160
jmp 0x2ffe
leaq -0xf0(%rbp), %rdi
callq 0x2448
leaq -0xf1(%rbp), %rdi
callq 0x2250
leaq -0x119(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x23e0
movq -0x2e8(%rbp), %rdx
leaq 0x324e(%rip), %rsi      # 0x6285
leaq -0x118(%rbp), %rdi
callq 0x3ef0
jmp 0x3045
leaq 0x622c(%rip), %rdi      # 0x9278
leaq -0x118(%rbp), %rsi
callq 0x4160
jmp 0x305a
leaq -0x118(%rbp), %rdi
callq 0x2448
leaq -0x119(%rbp), %rdi
callq 0x2250
leaq -0x141(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x23e0
movq -0x2f0(%rbp), %rdx
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3ef0
jmp 0x309e
leaq 0x61d3(%rip), %rdi      # 0x9278
leaq -0x140(%rbp), %rsi
callq 0x4160
jmp 0x30b3
leaq -0x140(%rbp), %rdi
callq 0x2448
leaq -0x141(%rbp), %rdi
callq 0x2250
leaq -0x169(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x23e0
movq -0x2f8(%rbp), %rdx
leaq 0x3180(%rip), %rsi      # 0x626c
leaq -0x168(%rbp), %rdi
callq 0x3ef0
jmp 0x30fa
leaq 0x6177(%rip), %rdi      # 0x9278
leaq -0x168(%rbp), %rsi
callq 0x4160
jmp 0x310f
leaq -0x168(%rbp), %rdi
callq 0x2448
leaq -0x169(%rbp), %rdi
callq 0x2250
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x2eac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3158
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2448
leaq -0x69(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x318c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x2448
leaq -0xa1(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x31c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x2448
leaq -0xc9(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x31fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x2448
leaq -0xf1(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3231
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x2448
leaq -0x119(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3268
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x2448
leaq -0x141(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x329f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x2448
leaq -0x169(%rbp), %rdi
callq 0x2250
jmp 0x372e
leaq -0x180(%rbp), %rdi
movss 0xfa295(%rip), %xmm0    # 0xfd554
cvtss2sd %xmm0, %xmm0
leaq 0x2e62(%rip), %rsi      # 0x612c
leaq 0x2f99(%rip), %rdx      # 0x626a
movb $0x1, %al
callq 0x2090
leaq -0x1a0(%rbp), %rdi
movl -0x4(%rbp), %edx
leaq 0x2e39(%rip), %rsi      # 0x6122
leaq 0x2f7a(%rip), %rcx      # 0x626a
movb $0x0, %al
callq 0x2090
movl $0x0, -0x1a4(%rbp)
movl -0x1a4(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x3725
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x23e0
movq -0x300(%rbp), %rdx
leaq -0x1c8(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x3ef0
jmp 0x3344
leaq 0x5f45(%rip), %rdi      # 0x9290
leaq -0x1c8(%rbp), %rsi
callq 0x4160
jmp 0x3359
leaq -0x1c8(%rbp), %rdi
callq 0x2448
leaq -0x1c9(%rbp), %rdi
callq 0x2250
leaq -0x1f1(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x23e0
movq -0x308(%rbp), %rdx
leaq 0x2eda(%rip), %rsi      # 0x626c
leaq -0x1f0(%rbp), %rdi
callq 0x3ef0
jmp 0x33a0
leaq 0x5ee9(%rip), %rdi      # 0x9290
leaq -0x1f0(%rbp), %rsi
callq 0x4160
jmp 0x33b5
leaq -0x1f0(%rbp), %rdi
callq 0x2448
leaq -0x1f1(%rbp), %rdi
callq 0x2250
leaq -0x219(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x23e0
movq -0x310(%rbp), %rdx
leaq 0x2e84(%rip), %rsi      # 0x6272
leaq -0x218(%rbp), %rdi
callq 0x3ef0
jmp 0x33fc
leaq 0x5e8d(%rip), %rdi      # 0x9290
leaq -0x218(%rbp), %rsi
callq 0x4160
jmp 0x3411
leaq -0x218(%rbp), %rdi
callq 0x2448
leaq -0x219(%rbp), %rdi
callq 0x2250
leaq -0x241(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x23e0
movq -0x318(%rbp), %rdx
leaq 0x2e32(%rip), %rsi      # 0x627c
leaq -0x240(%rbp), %rdi
callq 0x3ef0
jmp 0x3458
leaq 0x5e31(%rip), %rdi      # 0x9290
leaq -0x240(%rbp), %rsi
callq 0x4160
jmp 0x346d
leaq -0x240(%rbp), %rdi
callq 0x2448
leaq -0x241(%rbp), %rdi
callq 0x2250
leaq -0x269(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x23e0
movq -0x320(%rbp), %rdx
leaq 0x2ddf(%rip), %rsi      # 0x6285
leaq -0x268(%rbp), %rdi
callq 0x3ef0
jmp 0x34b4
leaq 0x5dd5(%rip), %rdi      # 0x9290
leaq -0x268(%rbp), %rsi
callq 0x4160
jmp 0x34c9
leaq -0x268(%rbp), %rdi
callq 0x2448
leaq -0x269(%rbp), %rdi
callq 0x2250
leaq -0x291(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x23e0
movq -0x328(%rbp), %rdx
leaq -0x290(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x3ef0
jmp 0x3510
leaq 0x5d79(%rip), %rdi      # 0x9290
leaq -0x290(%rbp), %rsi
callq 0x4160
jmp 0x3525
leaq -0x290(%rbp), %rdi
callq 0x2448
leaq -0x291(%rbp), %rdi
callq 0x2250
leaq -0x2b9(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x23e0
movq -0x330(%rbp), %rdx
leaq 0x2d0e(%rip), %rsi      # 0x626c
leaq -0x2b8(%rbp), %rdi
callq 0x3ef0
jmp 0x356c
leaq 0x5d1d(%rip), %rdi      # 0x9290
leaq -0x2b8(%rbp), %rsi
callq 0x4160
jmp 0x3581
leaq -0x2b8(%rbp), %rdi
callq 0x2448
leaq -0x2b9(%rbp), %rdi
callq 0x2250
movl -0x1a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a4(%rbp)
jmp 0x3301
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x35d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x2448
leaq -0x1c9(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x360a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x2448
leaq -0x1f1(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3641
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2448
leaq -0x219(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3678
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x2448
leaq -0x241(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x36af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x2448
leaq -0x269(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x36e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x2448
leaq -0x291(%rbp), %rdi
callq 0x2250
jmp 0x372e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x3717
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x2448
leaq -0x2b9(%rbp), %rdi
callq 0x2250
jmp 0x372e
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x23d0
nopw (%rax,%rax)