// File: jkingan[P]ladyheather/heathmsc.cpp
// Function: draw_sat(int, int, int, int, int, int)
void draw_sat(int prn, int x, int y, int r, int color, int fill)
{
int i,j;
int clip_left_x, clip_right_x;
int clip_top_y, clip_bottom_y;
int thickness;

   // draw the satellite on the map

   if(blink_sat() && (prn == blink_sat()) && (seconds & 1)) {  // blink the specified sat
      color = BLACK;
   }

   thickness = 1;
   if(!small_azel()) thickness = 2;

   if((zoom_screen == 'W') || ((zoom_screen == 0) && NO_SATS)) {
      clip_left_x = aclock_x-ACLOCK_R;
      clip_right_x = aclock_x+ACLOCK_R;
      clip_top_y = aclock_y-ACLOCK_R;
      clip_bottom_y = aclock_y+ACLOCK_R;
   }
   else {
      clip_left_x = AZEL_X-AZEL_RADIUS;
      clip_right_x = AZEL_X+AZEL_RADIUS;
      clip_top_y = AZEL_Y-AZEL_RADIUS;
      clip_bottom_y = AZEL_Y+AZEL_RADIUS;
   }
clip_right_x -= thickness;
clip_left_x += thickness;
clip_top_y += thickness;
clip_bottom_y -= thickness;


   if(fancy_sats == ROUND_SATS) {  // simple circular sats
      draw_circle(x,y, r, color, fill);
   }
   else if(fancy_sats == RECT_SATS) {  // simple rectangular sats
      i = j = r;
      if(fill) fill_rectangle(x-i,y-j, i+i,j+j, color);
      else     draw_rectangle(x-i,y-j, i+i,j+j, color);
   }
   else { // fancy sats
      if((fancy_sats == RECT_WINGS) || (fancy_sats == RECT_LINES)) {  // rectangle with wings
         i = (r*4) / 10;
         if(i < 2) i = 2;

         j = (r*3)/4;
         if(j < 3) j = 3;

         if(fill) fill_rectangle(x-i,y-j, i+i,j+j, color);
         else     draw_rectangle(x-i,y-j, i+i,j+j, color);
      }
      else if(fancy_sats == ROUND_LINES) {
         i = r*2/3;
         draw_circle(x,y, r*2/3, color, fill);
      }
      else {  // circle with wings
         draw_circle(x,y, r*2/3, color, fill);
      }

      // draw the wings
      if((fancy_sats == RECT_WINGS) || (fancy_sats == ROUND_WINGS)) {
         line(x+r,y+r, x+r,y-r, color);
         line(x-r,y+r, x-r,y-r, color);

         if(fill) {
            for(i=0-r; i<r; i++) {
               line(x+i,y+i, x+i,y-i, color);
            }
         }
         if(color) {
            line(x-r,y+r, x+r,y-r, color);
            line(x+r,y+r, x-r,y-r, color);
         }
      }
      else if(fancy_sats == RECT_LINES) {
         j = 3;
         i += 2;
         if(zoom_screen) j = 4;
         else if((y+r) <= clip_top_y) return;
         else if((y-r) >= clip_bottom_y) return;

         if(zoom_screen || ((x+r-2) <= clip_right_x)) {
            thick_line(x+r-2,y+r, x+r-2,y-r, color,j);
         }
         if(zoom_screen || ((x-r) >= (clip_left_x))) {
            thick_line(x-r,y+r,   x-r,y-r,   color,j);
         }

         if(zoom_screen) {
            thick_line(x+r-2,y, x+r-2-i-j,  y, color,j);
            thick_line(x-r,y,   x-r+i+(j-1),y, color,j);
         }
         else {
            if((x+r-1) <= clip_right_x) {
               thick_line(x+r-1,y, x+r-i-j-0,y, color,j);
            }
            if((x-r) >= clip_left_x) {
               thick_line(x-r,y,   x-r+i+j-1,y, color,j);
            }
         }
      }
      else if(fancy_sats == ROUND_LINES) {
         j = 3;
         if(zoom_screen) j = 4;
         else if((y+r) <= clip_top_y) return;
         else if((y-r) >= clip_bottom_y) return;

         if(zoom_screen || ((x+r-2) <= clip_right_x)) {
            thick_line(x+r-2,y+r, x+r-2,y-r, color,j);
         }
         if(zoom_screen || ((x-r) >= clip_left_x)) {
            thick_line(x-r,y+r,   x-r,y-r,   color,j);
         }

         if(zoom_screen || ((x+r-2) <= clip_right_x)) {
            thick_line(x+r-2,y, x+r-i/2,y,   color,j);
         }
         if(zoom_screen || ((x-r) >= clip_left_x)) {
            thick_line(x-r,y,   x-r+i/2-1,y, color,j);
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl %r9d, -0x18(%rbp)
callq 0x151660
cmpl $0x0, %eax
je 0x151722
movl -0x4(%rbp), %eax
movl %eax, -0x38(%rbp)
callq 0x151660
movl %eax, %ecx
movl -0x38(%rbp), %eax
cmpl %ecx, %eax
jne 0x151722
leaq 0x21af97(%rip), %rax    # 0x36c6a8
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x151722
movl $0x0, -0x14(%rbp)
movl $0x1, -0x34(%rbp)
callq 0x14e630
cmpl $0x0, %eax
jne 0x15173a
movl $0x2, -0x34(%rbp)
leaq 0x21a247(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x57, %eax
je 0x1517b2
leaq 0x21a238(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x151877
leaq 0x12634d(%rip), %rcx    # 0x277ab0
movabsq $0x105b8b0400, %rax     # imm = 0x105B8B0400
andq (%rcx), %rax
cmpq $0x0, %rax
jne 0x1517b2
leaq 0x128a33(%rip), %rax    # 0x27a1b0
cmpl $0x0, (%rax)
je 0x15178e
leaq 0x21ae1b(%rip), %rax    # 0x36c5a4
cmpl $0x0, (%rax)
je 0x1517b2
leaq 0x12631b(%rip), %rax    # 0x277ab0
cmpq $0x400000, (%rax)       # imm = 0x400000
jne 0x151877
leaq 0x21b3eb(%rip), %rax    # 0x36cb94
cmpl $0x0, (%rax)
jne 0x151877
leaq 0x248d9b(%rip), %rax    # 0x39a554
movl (%rax), %eax
movl %eax, -0x48(%rbp)
leaq 0x248d8b(%rip), %rax    # 0x39a550
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x48(%rbp), %eax
leaq 0x126215(%rip), %rdx    # 0x2779f0
subl (%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x24(%rbp)
leaq 0x248d6b(%rip), %rax    # 0x39a554
movl (%rax), %eax
movl %eax, -0x44(%rbp)
leaq 0x248d5b(%rip), %rax    # 0x39a550
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x44(%rbp), %eax
leaq 0x1261e5(%rip), %rdx    # 0x2779f0
subl (%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x28(%rbp)
leaq 0x248d3f(%rip), %rax    # 0x39a558
movl (%rax), %eax
movl %eax, -0x40(%rbp)
leaq 0x248d2b(%rip), %rax    # 0x39a550
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x40(%rbp), %eax
leaq 0x1261b5(%rip), %rdx    # 0x2779f0
subl (%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
leaq 0x248d0f(%rip), %rax    # 0x39a558
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
leaq 0x248cfb(%rip), %rax    # 0x39a550
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x3c(%rbp), %eax
leaq 0x126185(%rip), %rdx    # 0x2779f0
subl (%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x30(%rbp)
jmp 0x151937
leaq 0x248d02(%rip), %rax    # 0x39a580
movl (%rax), %eax
movl %eax, -0x58(%rbp)
leaq 0x248ce2(%rip), %rax    # 0x39a56c
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x58(%rbp), %eax
leaq 0x248cd8(%rip), %rdx    # 0x39a578
subl (%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x24(%rbp)
leaq 0x248cd2(%rip), %rax    # 0x39a580
movl (%rax), %eax
movl %eax, -0x54(%rbp)
leaq 0x248cb2(%rip), %rax    # 0x39a56c
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x54(%rbp), %eax
leaq 0x248ca8(%rip), %rdx    # 0x39a578
subl (%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x28(%rbp)
leaq 0x248ca6(%rip), %rax    # 0x39a584
movl (%rax), %eax
movl %eax, -0x50(%rbp)
leaq 0x248c82(%rip), %rax    # 0x39a56c
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x50(%rbp), %eax
leaq 0x248c78(%rip), %rdx    # 0x39a578
subl (%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
leaq 0x248c76(%rip), %rax    # 0x39a584
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
leaq 0x248c52(%rip), %rax    # 0x39a56c
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x4c(%rbp), %eax
leaq 0x248c48(%rip), %rdx    # 0x39a578
subl (%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x34(%rbp), %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x34(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x34(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x34(%rbp), %ecx
movl -0x30(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x30(%rbp)
leaq 0x128ca6(%rip), %rax    # 0x27a60c
cmpl $0x0, (%rax)
jne 0x151985
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
callq 0x11f00
jmp 0x151f6e
leaq 0x128c80(%rip), %rax    # 0x27a60c
cmpl $0x1, (%rax)
jne 0x1519e9
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x1519c3
movl -0x8(%rbp), %edi
subl -0x1c(%rbp), %edi
movl -0xc(%rbp), %esi
subl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
addl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl -0x14(%rbp), %r8d
callq 0x120d0
jmp 0x1519e4
movl -0x8(%rbp), %edi
subl -0x1c(%rbp), %edi
movl -0xc(%rbp), %esi
subl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
addl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl -0x14(%rbp), %r8d
callq 0x12030
jmp 0x151f6c
leaq 0x128c1c(%rip), %rax    # 0x27a60c
cmpl $0x3, (%rax)
je 0x151a05
leaq 0x128c10(%rip), %rax    # 0x27a60c
cmpl $0x5, (%rax)
jne 0x151a8b
movl -0x10(%rbp), %eax
shll $0x2, %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
cmpl $0x2, -0x1c(%rbp)
jge 0x151a23
movl $0x2, -0x1c(%rbp)
imull $0x3, -0x10(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jge 0x151a3f
movl $0x3, -0x20(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x151a68
movl -0x8(%rbp), %edi
subl -0x1c(%rbp), %edi
movl -0xc(%rbp), %esi
subl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
addl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl -0x14(%rbp), %r8d
callq 0x120d0
jmp 0x151a89
movl -0x8(%rbp), %edi
subl -0x1c(%rbp), %edi
movl -0xc(%rbp), %esi
subl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
addl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl -0x14(%rbp), %r8d
callq 0x12030
jmp 0x151aed
leaq 0x128b7a(%rip), %rax    # 0x27a60c
cmpl $0x4, (%rax)
jne 0x151aca
movl -0x10(%rbp), %eax
shll %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %eax
shll %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
callq 0x11f00
jmp 0x151aeb
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %eax
shll %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
callq 0x11f00
jmp 0x151aed
leaq 0x128b18(%rip), %rax    # 0x27a60c
cmpl $0x3, (%rax)
je 0x151b09
leaq 0x128b0c(%rip), %rax    # 0x27a60c
cmpl $0x2, (%rax)
jne 0x151beb
movl -0x8(%rbp), %edi
addl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
addl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
movzbl %al, %r8d
callq 0x109c0
movl -0x8(%rbp), %edi
subl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
subl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
movzbl %al, %r8d
callq 0x109c0
cmpl $0x0, -0x18(%rbp)
je 0x151b98
xorl %eax, %eax
subl -0x10(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x151b96
movl -0x8(%rbp), %edi
addl -0x1c(%rbp), %edi
movl -0xc(%rbp), %esi
addl -0x1c(%rbp), %esi
movl -0x8(%rbp), %edx
addl -0x1c(%rbp), %edx
movl -0xc(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movl -0x14(%rbp), %eax
movzbl %al, %r8d
callq 0x109c0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x151b5f
jmp 0x151b98
cmpl $0x0, -0x14(%rbp)
je 0x151be6
movl -0x8(%rbp), %edi
subl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
addl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
movzbl %al, %r8d
callq 0x109c0
movl -0x8(%rbp), %edi
addl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
subl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
movzbl %al, %r8d
callq 0x109c0
jmp 0x151f6a
leaq 0x128a1a(%rip), %rax    # 0x27a60c
cmpl $0x5, (%rax)
jne 0x151dd4
movl $0x3, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x1c(%rbp)
leaq 0x219d76(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
je 0x151c20
movl $0x4, -0x20(%rbp)
jmp 0x151c44
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x151c30
jmp 0x151f6e
movl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
cmpl -0x30(%rbp), %eax
jl 0x151c40
jmp 0x151f6e
jmp 0x151c42
jmp 0x151c44
leaq 0x219d3d(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
jne 0x151c5e
movl -0x8(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x2, %eax
cmpl -0x28(%rbp), %eax
jg 0x151c92
movl -0x8(%rbp), %edi
addl -0x10(%rbp), %edi
subl $0x2, %edi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
addl -0x10(%rbp), %edx
subl $0x2, %edx
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
leaq 0x219cef(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
jne 0x151ca9
movl -0x8(%rbp), %eax
subl -0x10(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x151cd7
movl -0x8(%rbp), %edi
subl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
subl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
leaq 0x219caa(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
je 0x151d4f
movl -0x8(%rbp), %edi
addl -0x10(%rbp), %edi
subl $0x2, %edi
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %edx
addl -0x10(%rbp), %edx
subl $0x2, %edx
subl -0x1c(%rbp), %edx
subl -0x20(%rbp), %edx
movl -0xc(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
movl -0x8(%rbp), %edi
subl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %edx
subl -0x10(%rbp), %edx
addl -0x1c(%rbp), %edx
movl -0x20(%rbp), %eax
subl $0x1, %eax
addl %eax, %edx
movl -0xc(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
jmp 0x151dcf
movl -0x8(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x1, %eax
cmpl -0x28(%rbp), %eax
jg 0x151d91
movl -0x8(%rbp), %edi
addl -0x10(%rbp), %edi
subl $0x1, %edi
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %edx
addl -0x10(%rbp), %edx
subl -0x1c(%rbp), %edx
subl -0x20(%rbp), %edx
subl $0x0, %edx
movl -0xc(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
movl -0x8(%rbp), %eax
subl -0x10(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x151dcd
movl -0x8(%rbp), %edi
subl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %edx
subl -0x10(%rbp), %edx
addl -0x1c(%rbp), %edx
addl -0x20(%rbp), %edx
subl $0x1, %edx
movl -0xc(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
jmp 0x151dcf
jmp 0x151f68
leaq 0x128831(%rip), %rax    # 0x27a60c
cmpl $0x4, (%rax)
jne 0x151f66
movl $0x3, -0x20(%rbp)
leaq 0x219b96(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
je 0x151e00
movl $0x4, -0x20(%rbp)
jmp 0x151e24
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x151e10
jmp 0x151f6e
movl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
cmpl -0x30(%rbp), %eax
jl 0x151e20
jmp 0x151f6e
jmp 0x151e22
jmp 0x151e24
leaq 0x219b5d(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
jne 0x151e3e
movl -0x8(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x2, %eax
cmpl -0x28(%rbp), %eax
jg 0x151e72
movl -0x8(%rbp), %edi
addl -0x10(%rbp), %edi
subl $0x2, %edi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
addl -0x10(%rbp), %edx
subl $0x2, %edx
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
leaq 0x219b0f(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
jne 0x151e89
movl -0x8(%rbp), %eax
subl -0x10(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x151eb7
movl -0x8(%rbp), %edi
subl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x8(%rbp), %edx
subl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
leaq 0x219aca(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
jne 0x151ed1
movl -0x8(%rbp), %eax
addl -0x10(%rbp), %eax
subl $0x2, %eax
cmpl -0x28(%rbp), %eax
jg 0x151f0f
movl -0x8(%rbp), %edi
addl -0x10(%rbp), %edi
subl $0x2, %edi
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x5c(%rbp), %edx
subl %eax, %edx
movl -0xc(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
leaq 0x219a72(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
jne 0x151f26
movl -0x8(%rbp), %eax
subl -0x10(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x151f64
movl -0x8(%rbp), %edi
subl -0x10(%rbp), %edi
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x60(%rbp), %edx
addl %eax, %edx
subl $0x1, %edx
movl -0xc(%rbp), %ecx
movl -0x14(%rbp), %eax
movb %al, %r8b
movl -0x20(%rbp), %eax
movzbl %r8b, %r8d
movzbl %al, %r9d
callq 0x11710
jmp 0x151f66
jmp 0x151f68
jmp 0x151f6a
jmp 0x151f6c
jmp 0x151f6e
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)