// File: /workspace/github_c_makefile_star2_O0/hyc[P]trek73c/trekx.c
// Function: mygetstr
void mygetstr(win, str, eol)
WINDOW *win;
char *str;
boolean eol;
{
  reg char c, *ptr;
  int y, x, y1, x1;
  reg int i=0;

  ptr = str;
  getyx(win, y1, x1);
  wrefresh(win);
  do {
    c=wgetch(win);
    if ((c == _Erase) && i) {
      ptr--;
      i--;
      getyx(win, y, x);
      mvwaddch(win, y, x-1, ' ');
    } else if (c == _Kill) {
      ptr=str;
      i=0;
      wmove(win, y1, x1);
      wclrtoeol(win);
    } else if ((c == '\n') || (c=='\r')) {
      *ptr = '\0';
      if (eol) {
        waddstr(win, "\n");
	wclrtoeol(win);
      }
      wrefresh(win);
      return;
    } else {
      *ptr++ = c;
      waddch(win, c);
    }
    wrefresh(win);
  } while (c != '\n');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x24d8
movq -0x8(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0x38(%rbp)
jmp 0x24e2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x38(%rbp)
jmp 0x24e2
movl -0x38(%rbp), %eax
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x24fd
movq -0x8(%rbp), %rax
movswl 0x2(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x2507
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x3c(%rbp)
jmp 0x2507
movl -0x3c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2180
movq -0x8(%rbp), %rdi
callq 0x22f0
movb %al, -0x12(%rbp)
movsbl -0x12(%rbp), %eax
movsbl 0x12f63(%rip), %ecx     # 0x15490
cmpl %ecx, %eax
jne 0x25c9
cmpl $0x0, -0x34(%rbp)
je 0x25c9
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x2568
movq -0x8(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0x40(%rbp)
jmp 0x2572
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x40(%rbp)
jmp 0x2572
movl -0x40(%rbp), %eax
movl %eax, -0x24(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x258d
movq -0x8(%rbp), %rax
movswl 0x2(%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0x2597
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x44(%rbp)
jmp 0x2597
movl -0x44(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
subl $0x1, %edx
callq 0x21d0
cmpl $-0x1, %eax
jne 0x25b6
jmp 0x25c4
movq -0x8(%rbp), %rdi
movl $0x20, %esi
callq 0x2150
jmp 0x266e
movsbl -0x12(%rbp), %eax
movsbl 0x12ebd(%rip), %ecx     # 0x15491
cmpl %ecx, %eax
jne 0x2601
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
callq 0x2210
jmp 0x266c
movsbl -0x12(%rbp), %eax
cmpl $0xa, %eax
je 0x2613
movsbl -0x12(%rbp), %eax
cmpl $0xd, %eax
jne 0x2649
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
cmpb $0x0, -0x11(%rbp)
je 0x263e
movq -0x8(%rbp), %rdi
leaq 0xd708(%rip), %rsi      # 0xfd33
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2200
movq -0x8(%rbp), %rdi
callq 0x2210
movq -0x8(%rbp), %rdi
callq 0x2180
jmp 0x2684
movb -0x12(%rbp), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movsbl -0x12(%rbp), %esi
callq 0x2150
jmp 0x266c
jmp 0x266e
movq -0x8(%rbp), %rdi
callq 0x2180
movsbl -0x12(%rbp), %eax
cmpl $0xa, %eax
jne 0x2516
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)