// File: havluj[P]spreadsheet/src/CTableController.cpp
// Function: CTableController::renderTable()
void CTableController::renderTable() {
    int maxY, maxX;
    getmaxyx(stdscr, maxY, maxX);

    init_pair(2, COLOR_RED, COLOR_BLACK);
    init_pair(3, COLOR_BLUE, COLOR_BLACK);

    int rowsCnt = (maxY - 10 - 3) / 2;
    if ((rowsCnt + m_rowStartingPosition) < m_rowPosition) {
	  m_rowStartingPosition = m_rowPosition - rowsCnt;
    } else if (m_rowPosition < m_rowStartingPosition) {
	  m_rowStartingPosition = m_rowPosition;
    }

    int colsCnt = (maxX - 6) / 10;
    if ((colsCnt + m_colStartingPosition) <= m_colPosition) {
	  m_colStartingPosition = m_colPosition - colsCnt + 1;
    } else if (m_colPosition < m_colStartingPosition) {
	  m_colStartingPosition = m_colPosition;
    }

    //==========================================================================
    /* create the grid */
    //==========================================================================
    attrset(COLOR_PAIR(3));
    /* horizontal lines */
    int offset = 10;
    for (int i = m_rowStartingPosition; i < (rowsCnt + m_rowStartingPosition); i++) {
	  if (m_rowPosition == i || m_rowPosition == (i + 1)) {
		attrset(COLOR_PAIR(2));
	  }
	  move(offset, 0);
	  hline(0, maxX);
	  attroff(COLOR_PAIR(2));
	  attrset(COLOR_PAIR(3));
	  offset += 2;
    }

    /* vertical lines */
    offset = 5;
    for (int i = m_colStartingPosition; i <= (colsCnt + m_colStartingPosition); i++) {
	  if (m_colPosition == i || m_colPosition == (i - 1)) {
		attrset(COLOR_PAIR(2));
	  }
	  move(7, offset);
	  vline(0, maxY - 7 - 3);
	  attroff(COLOR_PAIR(2));
	  attrset(COLOR_PAIR(3));
	  offset += 10;
    }
    attroff(COLOR_PAIR(3));

    /* We need to draw the main lines after we draw the regular ones, so they
	 will appear to be in front of the regular ones. */
    /* Main vertical line */
    move(7, 4);
    vline(0, maxY - 7 - 3);

    /* Main horizontal line. */
    move(8, 0);
    hline('=', maxX);

    //==========================================================================
    /* numbering cols and rows */
    //==========================================================================
    /* rows */
    offset = 9;
    for (int i = m_rowStartingPosition; i <= (rowsCnt + m_rowStartingPosition); i++) {
	  if (m_rowPosition == i) {
		attrset(COLOR_PAIR(2));
	  }
	  mvprintw(offset, 0, "%4d", i);
	  attroff(COLOR_PAIR(2));
	  offset += 2;
    }

    /* columns */
    offset = 6;
    std::string s;
    int digitsCnt;
    for (int i = m_colStartingPosition; i <= (colsCnt + m_colStartingPosition); i++) {
	  /* center the numbers */
	  s = "";
	  digitsCnt = std::to_string(i).length();
	  for (int j = 0; j < ((9 - digitsCnt) / 2); j++) {
		s.append(" ");
	  }
	  s.append(std::to_string(i));
	  for (int j = (s.length()); j < 9; j++) {
		s.append(" ");
	  }

	  if (m_colPosition == i) {
		attrset(COLOR_PAIR(2));
	  }
	  /* make sure to display only a part if there is not enough space */
	  if ((int) s.length() > (maxX - offset)) {
		mvprintw(7, offset, "%.*s", (maxX - offset), s.c_str());
	  } else {
		mvprintw(7, offset, "%s", s.c_str());
	  }
	  attroff(COLOR_PAIR(2));
	  offset += 10;
    }

    //==========================================================================
    /* filling out the table */
    //==========================================================================
    int rowOffset = 9;
    for (int i = m_rowStartingPosition; i <= (rowsCnt + m_rowStartingPosition); i++) {
	  int colOffset = 6;
	  for (int j = m_colStartingPosition; j <= (colsCnt + m_colStartingPosition); j++) {
		/* center the content */
		s = "";
		digitsCnt = m_database.getValue(i, j).length();
		for (int k = 0; k < ((9 - digitsCnt) / 2); k++) {
		    s.append(" ");
		}
		s.append(m_database.getValue(i, j));
		for (int k = (s.length()); k < 9; k++) {
		    s.append(" ");
		}

		/* keep only 9 characters */
		if (s.length() > 9) {
		    s = s.substr(0, 6);
		    s.append("...");
		}

		if (m_colPosition == j && m_rowPosition == i) {
		    attrset(COLOR_PAIR(2));
		}
		/* make sure to display only a part if there is not enough space */
		if ((int) s.length() > (maxX - colOffset)) {
		    mvprintw(rowOffset, colOffset, "%.*s", (maxX - colOffset), s.c_str());
		} else {
		    mvprintw(rowOffset, colOffset, "%s", s.c_str());
		}
		attroff(COLOR_PAIR(2));
		colOffset += 10;
	  }
	  rowOffset += 2;
    }

    refresh();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x138(%rbp)
xorl %eax, %eax
movq 0x14dd5(%rip), %rcx     # 0x27fb8
cmpq (%rcx), %rax
je 0x13201
movq 0x14dc9(%rip), %rax     # 0x27fb8
movq (%rax), %rax
movswl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, -0x13c(%rbp)
jmp 0x1320e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x13c(%rbp)
jmp 0x1320e
movl -0x13c(%rbp), %eax
movl %eax, -0xc(%rbp)
xorl %eax, %eax
movq 0x14d98(%rip), %rcx     # 0x27fb8
cmpq (%rcx), %rax
je 0x1323e
movq 0x14d8c(%rip), %rax     # 0x27fb8
movq (%rax), %rax
movswl 0x6(%rax), %eax
addl $0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0x1324b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x140(%rbp)
jmp 0x1324b
movl -0x140(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5070
movl $0x3, %edi
movl $0x4, %esi
xorl %edx, %edx
callq 0x5070
movq -0x138(%rbp), %rcx
movl -0xc(%rbp), %eax
subl $0xa, %eax
subl $0x3, %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl 0x80(%rcx), %eax
cmpl 0x78(%rcx), %eax
jge 0x132b4
movq -0x138(%rbp), %rax
movl 0x78(%rax), %ecx
subl -0x14(%rbp), %ecx
movl %ecx, 0x80(%rax)
jmp 0x132d8
movq -0x138(%rbp), %rcx
movl 0x78(%rcx), %eax
cmpl 0x80(%rcx), %eax
jge 0x132d6
movq -0x138(%rbp), %rax
movl 0x78(%rax), %ecx
movl %ecx, 0x80(%rax)
jmp 0x132d8
movq -0x138(%rbp), %rcx
movl -0x10(%rbp), %eax
subl $0x6, %eax
movl $0xa, %esi
cltd
idivl %esi
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl 0x84(%rcx), %eax
cmpl 0x7c(%rcx), %eax
jg 0x13316
movq -0x138(%rbp), %rax
movl 0x7c(%rax), %ecx
subl -0x18(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, 0x84(%rax)
jmp 0x1333a
movq -0x138(%rbp), %rcx
movl 0x7c(%rcx), %eax
cmpl 0x84(%rcx), %eax
jge 0x13338
movq -0x138(%rbp), %rax
movl 0x7c(%rax), %ecx
movl %ecx, 0x84(%rax)
jmp 0x1333a
movq 0x14c77(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x300, %esi            # imm = 0x300
callq 0x5490
movq -0x138(%rbp), %rax
movl $0xa, -0x1c(%rbp)
movl 0x80(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x138(%rbp), %rdx
movl -0x20(%rbp), %eax
movl -0x14(%rbp), %ecx
addl 0x80(%rdx), %ecx
cmpl %ecx, %eax
jge 0x13418
movq -0x138(%rbp), %rax
movl 0x78(%rax), %eax
cmpl -0x20(%rbp), %eax
je 0x133a3
movq -0x138(%rbp), %rax
movl 0x78(%rax), %eax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x133b7
movq 0x14c0e(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x5490
movl -0x1c(%rbp), %edi
xorl %esi, %esi
callq 0x52e0
movq 0x14bf0(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl -0x10(%rbp), %edx
xorl %esi, %esi
callq 0x53d0
movq 0x14bdc(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
movl %eax, %edx
callq 0x5550
movq 0x14bc4(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x300, %esi            # imm = 0x300
callq 0x5490
movl -0x1c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x13365
movq -0x138(%rbp), %rax
movl $0x5, -0x1c(%rbp)
movl 0x84(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x138(%rbp), %rdx
movl -0x24(%rbp), %eax
movl -0x18(%rbp), %ecx
addl 0x84(%rdx), %ecx
cmpl %ecx, %eax
jg 0x134eb
movq -0x138(%rbp), %rax
movl 0x7c(%rax), %eax
cmpl -0x24(%rbp), %eax
je 0x1346d
movq -0x138(%rbp), %rax
movl 0x7c(%rax), %eax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x13481
movq 0x14b44(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x5490
movl -0x1c(%rbp), %esi
movl $0x7, %edi
callq 0x52e0
movq 0x14b23(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
subl $0x7, %edx
subl $0x3, %edx
xorl %esi, %esi
callq 0x5530
movq 0x14b09(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
movl %eax, %edx
callq 0x5550
movq 0x14af1(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x300, %esi            # imm = 0x300
callq 0x5490
movl -0x1c(%rbp), %eax
addl $0xa, %eax
movl %eax, -0x1c(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1342f
movq 0x14ac6(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %eax, %eax
movl %eax, %edx
callq 0x5550
movl $0x7, %edi
movl $0x4, %esi
callq 0x52e0
movq 0x14a9f(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
subl $0x7, %edx
subl $0x3, %edx
xorl %esi, %esi
callq 0x5530
movl $0x8, %edi
xorl %esi, %esi
callq 0x52e0
movq 0x14a79(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl -0x10(%rbp), %edx
movl $0x3d, %esi
callq 0x53d0
movq -0x138(%rbp), %rax
movl $0x9, -0x1c(%rbp)
movl 0x80(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x138(%rbp), %rdx
movl -0x28(%rbp), %eax
movl -0x14(%rbp), %ecx
addl 0x80(%rdx), %ecx
cmpl %ecx, %eax
jg 0x135e2
movq -0x138(%rbp), %rax
movl 0x78(%rax), %eax
cmpl -0x28(%rbp), %eax
jne 0x135a0
movq 0x14a25(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x5490
movl -0x1c(%rbp), %edi
movl -0x28(%rbp), %ecx
xorl %esi, %esi
leaq 0x90d4(%rip), %rdx      # 0x1c683
movb $0x0, %al
callq 0x5570
movq 0x149fb(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
movl %eax, %edx
callq 0x5550
movl -0x1c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x1c(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x13566
movl $0x6, -0x1c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x55b0
movq -0x138(%rbp), %rax
movl 0x84(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x138(%rbp), %rdx
movl -0x50(%rbp), %eax
movl -0x18(%rbp), %ecx
addl 0x84(%rdx), %ecx
cmpl %ecx, %eax
jg 0x13823
leaq 0x9210(%rip), %rsi      # 0x1c834
leaq -0x48(%rbp), %rdi
callq 0x55a0
jmp 0x1362f
movl -0x50(%rbp), %esi
leaq -0x80(%rbp), %rdi
callq 0x13ec0
jmp 0x1363d
leaq -0x80(%rbp), %rdi
callq 0x5620
movl %eax, -0x4c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x52a0
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x144(%rbp)
movl $0x9, %eax
subl -0x4c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x144(%rbp), %eax
cmpl %ecx, %eax
jge 0x136ba
leaq 0x91a8(%rip), %rsi      # 0x1c833
leaq -0x48(%rbp), %rdi
callq 0x57f0
jmp 0x13696
jmp 0x13698
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x1365c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x13baa
movl -0x50(%rbp), %esi
leaq -0xa8(%rbp), %rdi
callq 0x13ec0
jmp 0x136cb
leaq -0x48(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x5810
jmp 0x136dd
leaq -0xa8(%rbp), %rdi
callq 0x52a0
leaq -0x48(%rbp), %rdi
callq 0x5620
movl %eax, -0xac(%rbp)
cmpl $0x9, -0xac(%rbp)
jge 0x13743
leaq 0x912b(%rip), %rsi      # 0x1c833
leaq -0x48(%rbp), %rdi
callq 0x57f0
jmp 0x13713
jmp 0x13715
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x136f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x52a0
jmp 0x13baa
movq -0x138(%rbp), %rax
movl 0x7c(%rax), %eax
cmpl -0x50(%rbp), %eax
jne 0x1376a
movq 0x1485f(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x5490
jmp 0x13768
jmp 0x1376a
leaq -0x48(%rbp), %rdi
callq 0x5620
movl -0x10(%rbp), %ecx
subl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jle 0x137c0
movl -0x1c(%rbp), %ecx
movl %ecx, -0x14c(%rbp)
movl -0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x148(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5190
movl -0x14c(%rbp), %esi
movl -0x148(%rbp), %ecx
movq %rax, %r8
leaq 0x8ed7(%rip), %rdx      # 0x1c687
xorl %eax, %eax
movl $0x7, %edi
callq 0x5570
jmp 0x137be
jmp 0x137f2
movl -0x1c(%rbp), %eax
movl %eax, -0x150(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5190
movl -0x150(%rbp), %esi
movq %rax, %rcx
leaq 0x8e7f(%rip), %rdx      # 0x1c661
xorl %eax, %eax
movl $0x7, %edi
callq 0x5570
jmp 0x137f0
jmp 0x137f2
movq 0x147bf(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x200, %esi            # imm = 0x200
callq 0x5550
jmp 0x1380c
movl -0x1c(%rbp), %eax
addl $0xa, %eax
movl %eax, -0x1c(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x13602
movq -0x138(%rbp), %rax
movl $0x9, -0xb0(%rbp)
movl 0x80(%rax), %eax
movl %eax, -0xb4(%rbp)
movq -0x138(%rbp), %rdx
movl -0xb4(%rbp), %eax
movl -0x14(%rbp), %ecx
addl 0x80(%rdx), %ecx
cmpl %ecx, %eax
jg 0x13b91
movq -0x138(%rbp), %rax
movl $0x6, -0xb8(%rbp)
movl 0x84(%rax), %eax
movl %eax, -0xbc(%rbp)
movq -0x138(%rbp), %rdx
movl -0xbc(%rbp), %eax
movl -0x18(%rbp), %ecx
addl 0x84(%rdx), %ecx
cmpl %ecx, %eax
jg 0x13b6e
leaq 0x8f94(%rip), %rsi      # 0x1c834
leaq -0x48(%rbp), %rdi
callq 0x55a0
jmp 0x138ab
movq -0x138(%rbp), %rsi
addq $0x8, %rsi
movl -0xb4(%rbp), %edx
movl -0xbc(%rbp), %ecx
leaq -0xe0(%rbp), %rdi
callq 0x8ce0
jmp 0x138d0
leaq -0xe0(%rbp), %rdi
callq 0x5620
movl %eax, -0x4c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x52a0
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0x154(%rbp)
movl $0x9, %eax
subl -0x4c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x154(%rbp), %eax
cmpl %ecx, %eax
jge 0x13942
leaq 0x8f0f(%rip), %rsi      # 0x1c833
leaq -0x48(%rbp), %rdi
callq 0x57f0
jmp 0x1392f
jmp 0x13931
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x138f5
movq -0x138(%rbp), %rsi
addq $0x8, %rsi
movl -0xb4(%rbp), %edx
movl -0xbc(%rbp), %ecx
leaq -0x108(%rbp), %rdi
callq 0x8ce0
jmp 0x13967
leaq -0x48(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x5810
jmp 0x13979
leaq -0x108(%rbp), %rdi
callq 0x52a0
leaq -0x48(%rbp), %rdi
callq 0x5620
movl %eax, -0x10c(%rbp)
cmpl $0x9, -0x10c(%rbp)
jge 0x139df
leaq 0x8e8f(%rip), %rsi      # 0x1c833
leaq -0x48(%rbp), %rdi
callq 0x57f0
jmp 0x139af
jmp 0x139b1
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0x13994
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x52a0
jmp 0x13baa
leaq -0x48(%rbp), %rdi
callq 0x5620
cmpq $0x9, %rax
jbe 0x13a4a
xorl %eax, %eax
movl %eax, %edx
leaq -0x130(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x6, %ecx
callq 0x5450
jmp 0x13a09
leaq -0x48(%rbp), %rdi
movq %rdi, -0x160(%rbp)
leaq -0x130(%rbp), %rsi
movq %rsi, -0x168(%rbp)
callq 0x5510
movq -0x168(%rbp), %rdi
callq 0x52a0
movq -0x160(%rbp), %rdi
leaq 0x8c4b(%rip), %rsi      # 0x1c68c
callq 0x57f0
jmp 0x13a48
jmp 0x13a4a
movq -0x138(%rbp), %rax
movl 0x7c(%rax), %eax
cmpl -0xbc(%rbp), %eax
jne 0x13a86
movq -0x138(%rbp), %rax
movl 0x78(%rax), %eax
cmpl -0xb4(%rbp), %eax
jne 0x13a86
movq 0x14543(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x5490
jmp 0x13a84
jmp 0x13a86
leaq -0x48(%rbp), %rdi
callq 0x5620
movl -0x10(%rbp), %ecx
subl -0xb8(%rbp), %ecx
cmpl %ecx, %eax
jle 0x13aef
movl -0xb0(%rbp), %eax
movl %eax, -0x174(%rbp)
movl -0xb8(%rbp), %ecx
movl %ecx, -0x170(%rbp)
movl -0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x16c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5190
movl -0x174(%rbp), %edi
movl -0x170(%rbp), %esi
movl -0x16c(%rbp), %ecx
movq %rax, %r8
leaq 0x8ba3(%rip), %rdx      # 0x1c687
xorl %eax, %eax
callq 0x5570
jmp 0x13aed
jmp 0x13b31
movl -0xb0(%rbp), %eax
movl %eax, -0x17c(%rbp)
movl -0xb8(%rbp), %eax
movl %eax, -0x178(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5190
movl -0x17c(%rbp), %edi
movl -0x178(%rbp), %esi
movq %rax, %rcx
leaq 0x8b3b(%rip), %rdx      # 0x1c661
xorl %eax, %eax
callq 0x5570
jmp 0x13b2f
jmp 0x13b31
movq 0x14480(%rip), %rax     # 0x27fb8
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x200, %esi            # imm = 0x200
callq 0x5550
jmp 0x13b4b
movl -0xb8(%rbp), %eax
addl $0xa, %eax
movl %eax, -0xb8(%rbp)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x1387b
movl -0xb0(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xb0(%rbp)
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x13840
callq 0x56e0
jmp 0x13b98
leaq -0x48(%rbp), %rdi
callq 0x52a0
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x52a0
movq -0x58(%rbp), %rdi
callq 0x5730
nopl (%rax)