LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jkingan[P]ladyheather/heather.cpp
// Function: get_clock_time()
int get_clock_time()
{
   // get the system clock into the clk_ variables

   #ifdef WINDOWS
      SYSTEMTIME t;
      GetSystemTime(&t);
      clk_year = t.wYear;
      clk_month = t.wMonth;
      clk_day = t.wDay;
      clk_hours = t.wHour;
      clk_minutes = t.wMinute;
      clk_seconds = t.wSecond;
      clk_frac = ((double) t.wMilliseconds) / 1000.0;

      clk_jd = jdate(clk_year,clk_month,clk_day);
      clk_jd += jtime(clk_hours,clk_minutes,clk_seconds,clk_frac);

      return 1;
   #endif

   #if defined(__linux__) || defined(__MACH__) || defined(__FreeBSD__)
      double t0;
      GetNsecs();   // get wall_time as seconds since epoch (with high-res fractional seconds)

      t0 = wall_time / (24.0*60.0*60.0); // convert seconds to days
      t0 += LINUX_EPOCH;  // add in Linux epoch

      gregorian(0, t0);          // convert to gregorian
      clk_year = g_year;
      clk_month = g_month;
      clk_day = g_day;
      clk_hours = g_hours;
      clk_minutes = g_minutes;
      clk_seconds = g_seconds;
      clk_frac = g_frac;

      clk_jd = jdate(clk_year,clk_month,clk_day);
      clk_jd += jtime(clk_hours,clk_minutes,clk_seconds,clk_frac);
      return 1;
   #endif

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xabe0
movsd 0x362103(%rip), %xmm0   # 0x36c868
movsd 0x16489b(%rip), %xmm1   # 0x16f008
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd 0x1648a2(%rip), %xmm0   # 0x16f020
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
xorl %edi, %edi
callq 0x11dd00
movl 0x3620ea(%rip), %eax    # 0x36c884
movl %eax, 0x362108(%rip)    # 0x36c8a8
movl 0x3620d6(%rip), %eax    # 0x36c87c
movl %eax, 0x3620f4(%rip)    # 0x36c8a0
movl 0x3620ce(%rip), %eax    # 0x36c880
movl %eax, 0x3620ec(%rip)    # 0x36c8a4
movl 0x3620ca(%rip), %eax    # 0x36c888
movl %eax, 0x3620e8(%rip)    # 0x36c8ac
movl 0x3620c2(%rip), %eax    # 0x36c88c
movl %eax, 0x3620e0(%rip)    # 0x36c8b0
movl 0x3620ba(%rip), %eax    # 0x36c890
movl %eax, 0x3620d8(%rip)    # 0x36c8b4
movsd 0x3620b4(%rip), %xmm0   # 0x36c898
movsd %xmm0, 0x3620cc(%rip)   # 0x36c8b8
movl 0x3620b6(%rip), %edi    # 0x36c8a8
movl 0x3620a8(%rip), %esi    # 0x36c8a0
movl 0x3620a6(%rip), %edx    # 0x36c8a4
callq 0x122140
movsd %xmm0, 0x3620b5(%rip)   # 0x36c8c0
movl 0x36209b(%rip), %edi    # 0x36c8ac
movl 0x362099(%rip), %esi    # 0x36c8b0
movl 0x362097(%rip), %edx    # 0x36c8b4
movsd 0x362093(%rip), %xmm0   # 0x36c8b8
callq 0x122210
addsd 0x36208e(%rip), %xmm0   # 0x36c8c0
movsd %xmm0, 0x362086(%rip)   # 0x36c8c0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: open_rinex_file(char*)
FILE *open_rinex_file(char *f)
{
char *s;
char *star;

   s = trim_whitespace(f);
   if(s == 0) return 0;

   if(rinex_file) {
      fclose(rinex_file);
      rinex_file = 0;
   }

   star = strchr(s, FLUSH_CHAR);
   if(star) {
      *star = 0;
      rinex_flush_mode = 1;
   }
   else rinex_flush_mode = 0;

   rinex_file = topen(s, "w");
   if(rinex_file) {
      if(debug_file) fprintf(debug_file, "! RINEX file %s opened\n", s);
   }
   strcpy(rinex_name, s);
   rinex_header_written = 0;
   first_obs = 1;
   return rinex_file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa150
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa87d
movq $0x0, -0x8(%rbp)
jmp 0xa949
cmpq $0x0, 0x292cc3(%rip)    # 0x29d548
je 0xa89e
movq 0x292cba(%rip), %rdi    # 0x29d548
callq 0x9380
movq $0x0, 0x292caa(%rip) # 0x29d548
movq -0x18(%rbp), %rdi
movl $0x2a, %esi
callq 0x9100
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa8ca
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movl $0x1, 0x292d3c(%rip)    # 0x29d604
jmp 0xa8d4
movl $0x0, 0x292d30(%rip)    # 0x29d604
movq -0x18(%rbp), %rdi
leaq 0x179d6c(%rip), %rsi    # 0x18464b
callq 0x9b20
movq %rax, 0x292c5d(%rip)    # 0x29d548
cmpq $0x0, 0x292c55(%rip)    # 0x29d548
je 0xa91a
cmpq $0x0, 0x292c73(%rip)    # 0x29d570
je 0xa918
movq 0x292c6a(%rip), %rdi    # 0x29d570
movq -0x18(%rbp), %rdx
leaq 0x164d2b(%rip), %rsi    # 0x16f63c
movb $0x0, %al
callq 0x9550
jmp 0xa91a
movq -0x18(%rbp), %rsi
leaq 0x29181b(%rip), %rdi    # 0x29c140
callq 0x9350
movl $0x0, 0x292c98(%rip)    # 0x29d5cc
movl $0x1, 0x361e22(%rip)    # 0x36c760
movq 0x292c03(%rip), %rax    # 0x29d548
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: open_raw_file(char*, char*)
FILE *open_raw_file(char *name, char *mode)
{
char *s;
FILE *file;

   if(name == 0) return 0;
   if(mode == 0) return 0;

   if(raw_file) {
      fclose(raw_file);
      raw_file = 0;
   }

   s = strchr(name, FLUSH_CHAR);
   if(s) {
      *s = 0;
      raw_flush_mode = 1;
   }
   else raw_flush_mode = 0;

//lfs drain_port(RCVR_PORT);
   wakeup_tsip_msg = 0;        // cause wait for full receiver message before logging raw data
   saw_rcvr_msg = 0;
   file = topen(name, mode);
   if(file) {
      if(debug_file) fprintf(debug_file, "! raw capture file %s opened\n", name);
   }
   wakeup_tsip_msg = 0;        // cause wait for full receiver message before logging raw data
   saw_rcvr_msg = 0;

   return file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa984
movq $0x0, -0x8(%rbp)
jmp 0xaa5e
cmpq $0x0, -0x18(%rbp)
jne 0xa998
movq $0x0, -0x8(%rbp)
jmp 0xaa5e
cmpq $0x0, 0x292bb0(%rip)    # 0x29d550
je 0xa9b9
movq 0x292ba7(%rip), %rdi    # 0x29d550
callq 0x9380
movq $0x0, 0x292b97(%rip) # 0x29d550
movq -0x10(%rbp), %rdi
movl $0x2a, %esi
callq 0x9100
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa9e5
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movl $0x1, 0x292c19(%rip)    # 0x29d5fc
jmp 0xa9ef
movl $0x0, 0x292c0d(%rip)    # 0x29d5fc
movq $0x0, 0x29377e(%rip) # 0x29e178
movl $0x0, 0x29377c(%rip)    # 0x29e180
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9b20
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xaa41
cmpq $0x0, 0x292b4c(%rip)    # 0x29d570
je 0xaa3f
movq 0x292b43(%rip), %rdi    # 0x29d570
movq -0x10(%rbp), %rdx
leaq 0x164c1c(%rip), %rsi    # 0x16f654
movb $0x0, %al
callq 0x9550
jmp 0xaa41
movq $0x0, 0x29372c(%rip) # 0x29e178
movl $0x0, 0x29372a(%rip)    # 0x29e180
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: open_prn_file(char*, char*)
FILE *open_prn_file(char *name, char *mode)
{
char *s;
FILE *file;

   if(name == 0) return 0;
   if(mode == 0) return 0;

   if(prn_file) {
      fclose(prn_file);
      prn_file = 0;
      prn_count = 0;
   }

   s = strchr(name, FLUSH_CHAR);
   if(s) {
      *s = 0;
      prn_flush_mode = 1;
   }
   else prn_flush_mode = 0;

//lfs drain_port(RCVR_PORT);
   file = topen(name, mode);
   if(file) {
      fprintf(file, "#JD UTC         PRN   AZ     EL     SIG\n");
      fprintf(file, "# 1\n");
      if(prn_flush_mode) fflush(file);
      prn_count = 1;
      if(debug_file) fprintf(debug_file, "! PRN file %s opened\n", name);
   }

   return file;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xaa94
movq $0x0, -0x8(%rbp)
jmp 0xab8e
cmpq $0x0, -0x18(%rbp)
jne 0xaaa8
movq $0x0, -0x8(%rbp)
jmp 0xab8e
cmpq $0x0, 0x292aa8(%rip)    # 0x29d558
je 0xaad3
movq 0x292a9f(%rip), %rdi    # 0x29d558
callq 0x9380
movq $0x0, 0x292a8f(%rip) # 0x29d558
movl $0x0, 0x292b25(%rip)    # 0x29d5f8
movq -0x10(%rbp), %rdi
movl $0x2a, %esi
callq 0x9100
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xaaff
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movl $0x1, 0x292b0f(%rip)    # 0x29d60c
jmp 0xab09
movl $0x0, 0x292b03(%rip)    # 0x29d60c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9b20
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xab86
movq -0x28(%rbp), %rdi
leaq 0x164b46(%rip), %rsi    # 0x16f672
movb $0x0, %al
callq 0x9550
movq -0x28(%rbp), %rdi
leaq 0x164b5d(%rip), %rsi    # 0x16f69b
movb $0x0, %al
callq 0x9550
cmpl $0x0, 0x292ac0(%rip)    # 0x29d60c
je 0xab57
movq -0x28(%rbp), %rdi
callq 0x9430
movl $0x1, 0x292a97(%rip)    # 0x29d5f8
cmpq $0x0, 0x292a07(%rip)    # 0x29d570
je 0xab84
movq 0x2929fe(%rip), %rdi    # 0x29d570
movq -0x10(%rbp), %rdx
leaq 0x164b23(%rip), %rsi    # 0x16f6a0
movb $0x0, %al
callq 0x9550
jmp 0xab86
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: sim_kbd_check()
int sim_kbd_check()
{
    // this routine is used to determine how often to let Heather check
    // for a keystroke while reading a simulation file.

    if(pause_data) return 0;

    if(rcvr_type == TICC_RCVR) {
       if(1 || sim_delay) com_tick = (com_tick + 1) % 100;  // aaaaahhhhh
       else               com_tick = (com_tick + 1) % 20000;
    }
    else com_tick = (com_tick + 1) % 100;
//  else com_tick = (com_tick + 1) % 20000;

    if(com_tick > 2) return 1;
    else             return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x26f489(%rip)    # 0x27a414
je 0xaf96
movl $0x0, -0x4(%rbp)
jmp 0xafec
cmpq $0x10000, 0x26cb0f(%rip) # imm = 0x10000
jne 0xafbc
movl 0x394133(%rip), %eax    # 0x39f0dc
addl $0x1, %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %edx, 0x394122(%rip)    # 0x39f0dc
jmp 0xafd3
movl 0x39411a(%rip), %eax    # 0x39f0dc
addl $0x1, %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %edx, 0x394109(%rip)    # 0x39f0dc
cmpl $0x2, 0x394102(%rip)    # 0x39f0dc
jle 0xafe5
movl $0x1, -0x4(%rbp)
jmp 0xafec
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: get_sim_char(unsigned int)
u08 get_sim_char(unsigned port)
{
int flag;
u08 c;

   // get a character from a simulation file.
   if(sim_file == 0) return 0;  // simulation file not being used

   if(sim_eof) {
      return 0;
   }

   flag = fread(&c, 1, 1, sim_file);
   if(flag <= 0) {  // just reached the end of file
      BEEP(4);
      sim_eof = 1;

      sprintf(plot_title, "Reached end of simulation file: %s", sim_name);
      refresh_page();
      return 0;
   }

   if((zoom_screen == 'O') && (port == monitor_port)) {   // send char to "terminal" format monitor screen
      echo_term(monitor_port, c, monitor_hex, 0);
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
cmpq $0x0, 0x29258d(%rip)    # 0x29d5a0
jne 0xb01e
movb $0x0, -0x1(%rbp)
jmp 0xb0c0
cmpl $0x0, 0x292593(%rip)    # 0x29d5b8
je 0xb030
movb $0x0, -0x1(%rbp)
jmp 0xb0c0
movq 0x292569(%rip), %rcx    # 0x29d5a0
leaq -0xd(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x9580
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jg 0xb08c
movl $0x4, %edi
callq 0x9ec0
movl $0x1, 0x292553(%rip)    # 0x29d5b8
leaq 0x3929c4(%rip), %rdi    # 0x39da30
leaq 0x164643(%rip), %rsi    # 0x16f6b6
leaq 0x2916c6(%rip), %rdx    # 0x29c740
movb $0x0, %al
callq 0x9060
callq 0xb0d0
movb $0x0, -0x1(%rbp)
jmp 0xb0c0
movzbl 0x3608f5(%rip), %eax    # 0x36b988
cmpl $0x4f, %eax
jne 0xb0ba
movl -0x8(%rbp), %eax
cmpl 0x36240f(%rip), %eax    # 0x36d4b0
jne 0xb0ba
movl 0x362407(%rip), %edi    # 0x36d4b0
movzbl -0xd(%rbp), %esi
movl 0x292571(%rip), %edx    # 0x29d624
xorl %ecx, %ecx
callq 0xb1d0
movb -0xd(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: refresh_page()
void refresh_page(void)
{
   // if double buffering the screen, copy background pixmap to display window
   // also flush the X11 drawing queue

   if(display == 0) return;

if(0 && sim_file && (sim_eof == 0)) {  // this can double the sim file rate
   if((com_tick % 200) != 10) return;
}

   if(pix_map && x11_io_done) {
      SWAP(SCREEN_WIDTH,SCREEN_HEIGHT);
      XCopyArea(display,pix_map,screen,gc, 0,0, SCREEN_WIDTH,SCREEN_HEIGHT, 0,0);
      SWAP(SCREEN_WIDTH,SCREEN_HEIGHT);
   }

   XFlush(display);

   x11_io_done = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpq $0x0, 0x1c4fc0(%rip)    # 0x1d00a0
jne 0xb0e7
jmp 0xb1bd
cmpq $0x0, 0x1c4fc1(%rip)    # 0x1d00b0
je 0xb1aa
cmpb $0x0, 0x1c4f8c(%rip)    # 0x1d0088
je 0xb1aa
cmpl $0x0, 0x26c8ff(%rip)    # 0x277a08
je 0xb12f
movl 0x26c8d3(%rip), %eax    # 0x2779e4
movl %eax, 0x26c8f5(%rip)    # 0x277a0c
movl 0x26c8c3(%rip), %eax    # 0x2779e0
movl %eax, 0x26c8c1(%rip)    # 0x2779e4
movl 0x26c8e3(%rip), %eax    # 0x277a0c
movl %eax, 0x26c8b1(%rip)    # 0x2779e0
movq 0x1c4f6a(%rip), %rdi    # 0x1d00a0
movq 0x1c4f73(%rip), %rsi    # 0x1d00b0
movq 0x1c4f64(%rip), %rdx    # 0x1d00a8
movq 0x1c4f75(%rip), %rcx    # 0x1d00c0
movl 0x26c88e(%rip), %r10d   # 0x2779e0
movl 0x26c88c(%rip), %eax    # 0x2779e4
xorl %r9d, %r9d
movl %r9d, %r8d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
callq 0x9150
cmpl $0x0, 0x26c886(%rip)    # 0x277a08
je 0xb1a8
movl 0x26c85a(%rip), %eax    # 0x2779e4
movl %eax, 0x26c87c(%rip)    # 0x277a0c
movl 0x26c84a(%rip), %eax    # 0x2779e0
movl %eax, 0x26c848(%rip)    # 0x2779e4
movl 0x26c86a(%rip), %eax    # 0x277a0c
movl %eax, 0x26c838(%rip)    # 0x2779e0
jmp 0xb1aa
movq 0x1c4eef(%rip), %rdi    # 0x1d00a0
callq 0x95b0
movb $0x0, 0x1c4ecb(%rip)    # 0x1d0088
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: SetDtrLine(unsigned int, unsigned char)
void SetDtrLine(unsigned port, u08 on)
{
int val;

   if(port >= NUM_COM_PORTS) return;

   if(com[port].com_fd < 0) return;  // !!!! zork what if TCPIP connected

   val = TIOCM_DTR;
   if(on) ioctl(com[port].com_fd, TIOCMBIS, &val);
   else   ioctl(com[port].com_fd, TIOCMBIC, &val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movl %edi, -0x4(%rbp)
movb %al, -0x5(%rbp)
cmpl $0x13, -0x4(%rbp)
jb 0xb679
jmp 0xb6f8
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361e3b(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jge 0xb697
jmp 0xb6f8
movl $0x2, -0xc(%rbp)
cmpb $0x0, -0x5(%rbp)
je 0xb6cf
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361e10(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl 0x8(%rax), %edi
movl $0x5416, %esi           # imm = 0x5416
leaq -0xc(%rbp), %rdx
movb $0x0, %al
callq 0x9520
jmp 0xb6f8
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361de5(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl 0x8(%rax), %edi
movl $0x5417, %esi           # imm = 0x5417
leaq -0xc(%rbp), %rdx
movb $0x0, %al
callq 0x9520
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heather.cpp
// Function: SetRtsLine(unsigned int, unsigned char)
void SetRtsLine(unsigned port, u08 on)
{
int val;

   if(port >= NUM_COM_PORTS) return;

   if(com[port].com_fd < 0) return;  // !!!! zork what if TCPIP connected

   val = TIOCM_RTS;
   if(on) ioctl(com[port].com_fd, TIOCMBIS, &val);
   else   ioctl(com[port].com_fd, TIOCMBIC, &val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movl %edi, -0x4(%rbp)
movb %al, -0x5(%rbp)
cmpl $0x13, -0x4(%rbp)
jb 0xb719
jmp 0xb798
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361d9b(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jge 0xb737
jmp 0xb798
movl $0x4, -0xc(%rbp)
cmpb $0x0, -0x5(%rbp)
je 0xb76f
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361d70(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl 0x8(%rax), %edi
movl $0x5416, %esi           # imm = 0x5416
leaq -0xc(%rbp), %rdx
movb $0x0, %al
callq 0x9520
jmp 0xb798
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361d45(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl 0x8(%rax), %edi
movl $0x5417, %esi           # imm = 0x5417
leaq -0xc(%rbp), %rdx
movb $0x0, %al
callq 0x9520
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heather.cpp
// Function: SetBreak(unsigned int, unsigned char)
void SetBreak(unsigned port, u08 on)
{
   if(port >= NUM_COM_PORTS) return;

   if(com[port].com_fd < 0) return;  // !!!! zork what if TCPIP connected

   if(on) ioctl(com[port].com_fd, TIOCSBRK, 0);
   else   ioctl(com[port].com_fd, TIOCCBRK, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movl %edi, -0x4(%rbp)
movb %al, -0x5(%rbp)
cmpl $0x13, -0x4(%rbp)
jb 0xb7b9
jmp 0xb82d
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361cfb(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jge 0xb7d7
jmp 0xb82d
cmpb $0x0, -0x5(%rbp)
je 0xb806
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361cd7(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl 0x8(%rax), %edi
movl $0x5427, %esi           # imm = 0x5427
xorl %edx, %edx
movb $0x0, %al
callq 0x9520
jmp 0xb82d
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361cae(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl 0x8(%rax), %edi
movl $0x5428, %esi           # imm = 0x5428
xorl %edx, %edx
movb $0x0, %al
callq 0x9520
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: SendBreak(unsigned int)
void SendBreak(unsigned port)
{
   // This routine sends a 300 msec BREAK signal to the serial port
   if(port >= NUM_COM_PORTS) return;
   if(com[port].com_fd < 0) return;  // !!!! should also return if IP connected

// tcsendbreak(com[port].com_fd, 0);  // send a 200..500 ms (supposedly) break
   SetBreak(port, 1);  // a more reliable way to do the BREAK
   Sleep(500);
   SetBreak(port, 0);
   Sleep(100);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x13, -0x4(%rbp)
jb 0xb853
jmp 0xb89c
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361c61(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jge 0xb871
jmp 0xb89c
movl -0x4(%rbp), %edi
movl $0x1, %esi
callq 0xb7a0
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xb8b0
movl -0x4(%rbp), %edi
xorl %esi, %esi
callq 0xb7a0
movl $0x64, %edi
callq 0xb8b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: Sleep(int)
void Sleep(int time)
{
   time *= 1000;   // convert msecs to usecs
   while(time > 1000000) {
      usleep(1000000);
      time -= 1000000;
   }
   usleep(time);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
imull $0x3e8, -0x4(%rbp), %eax # imm = 0x3E8
movl %eax, -0x4(%rbp)
cmpl $0xf4240, -0x4(%rbp)    # imm = 0xF4240
jle 0xb8e5
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x9530
movl -0x4(%rbp), %eax
subl $0xf4240, %eax          # imm = 0xF4240
movl %eax, -0x4(%rbp)
jmp 0xb8c5
movl -0x4(%rbp), %edi
callq 0x9530
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: kill_com(unsigned int, int)
void kill_com(unsigned port, int why)
{
   // close the serial communications device
   if(port >= NUM_COM_PORTS) return;
   com[port].port_used = 1;   // port has been closed

   if(com[port].com_fd < 0) return;

   tcsetattr(com[port].com_fd, TCSANOW, &oldtio);
   close(com[port].com_fd);

   com[port].com_fd = (-1);
   com[port].com_running = (-11); //NOT_RUNNING;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $0x13, -0x4(%rbp)
jb 0xb919
jmp 0xb9dc
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361b9b(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl $0x1, 0x222c(%rax)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361b7b(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jge 0xb95a
jmp 0xb9dc
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361b5a(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl 0x8(%rax), %edi
xorl %esi, %esi
leaq 0x1c4764(%rip), %rdx    # 0x1d00e0
callq 0x94c0
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361b33(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl 0x8(%rax), %edi
callq 0x9740
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361b15(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x361af8(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
movl $0xfffffff5, 0x2230(%rax) # imm = 0xFFFFFFF5
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: error_exit(int, char*)
void error_exit(int num,  char *s)
{
char err[1024];

   if(s) sprintf(err, "Error exit %d: %s", num, s);
   else  sprintf(err, "Error exit %d!", num);

   break_flag = 1;

   #ifdef WIN_VFX
      SAL_alert_box("Error", err);
   #else   // __linux__  __MACH__  __FreeBSD__
      printf("*** ERROR: %s\n", err);
   #endif

   if(num) shut_down(num);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x410, %rsp            # imm = 0x410
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc087
leaq -0x410(%rbp), %rdi
movl -0x4(%rbp), %edx
movq -0x10(%rbp), %rcx
leaq 0x164012(%rip), %rsi    # 0x170090
movb $0x0, %al
callq 0x9060
jmp 0xc09f
leaq -0x410(%rbp), %rdi
movl -0x4(%rbp), %edx
leaq 0x16400a(%rip), %rsi    # 0x1700a2
movb $0x0, %al
callq 0x9060
movl $0x1, 0x38a15b(%rip)    # 0x396204
leaq -0x410(%rbp), %rsi
leaq 0x163ffa(%rip), %rdi    # 0x1700b1
movb $0x0, %al
callq 0x9030
cmpl $0x0, -0x4(%rbp)
je 0xc0cc
movl -0x4(%rbp), %edi
callq 0x100f0
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: init_hardware()
void init_hardware(void)
{
   init_com(RCVR_PORT, 2);
   init_screen(9103);

   if(NO_SCPI_BREAK && (rcvr_type == SCPI_RCVR)) ;
   else if(nortel == 0) {    // To wake up a Nortel NTGS55A, etc receiver
      SendBreak(RCVR_PORT);
   }

   need_screen_init = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xa, %edi
movl $0x2, %esi
callq 0xc0e0
movl $0x238f, %edi           # imm = 0x238F
callq 0xd430
movzbl 0x290d05(%rip), %eax    # 0x29e119
cmpl $0x0, %eax
jne 0xd423
movl $0xa, %edi
callq 0xb840
movl $0x0, 0x26a59b(%rip)    # 0x2779c8
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heather.cpp
// Function: kill_screen()
void kill_screen(void)
{
   // shutdown the X11 server and screen

   if(display == 0) return;
   XFlush(display);

   if(pix_map) XFreePixmap(display, pix_map);
   pix_map = 0;

   if(icon_map) XFreePixmap(display, icon_map);
   icon_map = 0;

   XDestroyWindow(display, screen);
   screen = 0;
   XFlush(display);

   XFreeGC(display, gc);
   gc = 0;
   XFlush(display);

   if(size_hints) XFree(size_hints);
   size_hints = 0;
   if(wm_hints) XFree(wm_hints);
   wm_hints = 0;
   if(class_hints) XFree(class_hints);
   class_hints = 0;

   XFlush(display);
   XCloseDisplay(display);
   display = 0;

   x11_io_done = 0;
   last_x11_color = 0x80;
   Sleep(X11_sleep);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x1c20a4(%rip)    # 0x1d00a0
jne 0xe003
jmp 0xe151
movq 0x1c2096(%rip), %rdi    # 0x1d00a0
callq 0x95b0
cmpq $0x0, 0x1c2099(%rip)    # 0x1d00b0
je 0xe02c
movq 0x1c2080(%rip), %rdi    # 0x1d00a0
movq 0x1c2089(%rip), %rsi    # 0x1d00b0
callq 0x96c0
movq $0x0, 0x1c2079(%rip) # 0x1d00b0
cmpq $0x0, 0x1c2079(%rip)    # 0x1d00b8
je 0xe054
movq 0x1c2058(%rip), %rdi    # 0x1d00a0
movq 0x1c2069(%rip), %rsi    # 0x1d00b8
callq 0x96c0
movq $0x0, 0x1c2059(%rip) # 0x1d00b8
movq 0x1c203a(%rip), %rdi    # 0x1d00a0
movq 0x1c203b(%rip), %rsi    # 0x1d00a8
callq 0x9600
movq $0x0, 0x1c202b(%rip) # 0x1d00a8
movq 0x1c201c(%rip), %rdi    # 0x1d00a0
callq 0x95b0
movq 0x1c2010(%rip), %rdi    # 0x1d00a0
movq 0x1c2029(%rip), %rsi    # 0x1d00c0
callq 0x91f0
movq $0x0, 0x1c2019(%rip) # 0x1d00c0
movq 0x1c1ff2(%rip), %rdi    # 0x1d00a0
callq 0x95b0
cmpq $0x0, 0x39107d(%rip)    # 0x39f138
je 0xe0c9
movq 0x391074(%rip), %rdi    # 0x39f138
callq 0x94b0
movq $0x0, 0x391064(%rip) # 0x39f138
cmpq $0x0, 0x391064(%rip)    # 0x39f140
je 0xe0ea
movq 0x39105b(%rip), %rdi    # 0x39f140
callq 0x94b0
movq $0x0, 0x39104b(%rip) # 0x39f140
cmpq $0x0, 0x39104b(%rip)    # 0x39f148
je 0xe10b
movq 0x391042(%rip), %rdi    # 0x39f148
callq 0x94b0
movq $0x0, 0x391032(%rip) # 0x39f148
movq 0x1c1f83(%rip), %rdi    # 0x1d00a0
callq 0x95b0
movq 0x1c1f77(%rip), %rdi    # 0x1d00a0
callq 0x9700
movq $0x0, 0x1c1f67(%rip) # 0x1d00a0
movb $0x0, 0x1c1f48(%rip)    # 0x1d0088
movb $-0x80, 0x1aff7d(%rip)  # 0x1be0c4
movl $0x64, %edi
callq 0xb8b0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: RGB_NATIVE(int, int, int)
u32 RGB_NATIVE(int r, int g, int b)
{
u32 color;

   // convert 8-bit R,G,B values to X11 pixel color
   // !!!!!! we need to use the proper X11 way to do this... whatever that is

   if     (wattr.depth == 15) color = (((u32) (r>>3))<<10)  | (((u32) (g>>3))<<5) | ((u32) (b>>3));
   else if(wattr.depth == 16) color = (((u32) (r>>3))<<11)  | (((u32) (g>>2))<<5) | ((u32) (b>>3));
   else if(wattr.depth == 18) color = (((u32) (r>>2))<<12)  | (((u32) (g>>2))<<6) | ((u32) (b>>2));
   else if(wattr.depth == 24) color = (((u32) r)<<16)       | (((u32) g)<<8)      | ((u32) b);
   else if(wattr.depth == 30) color = (((u32) r)<<20)       | (((u32) g)<<10)     | ((u32) (b<<2));
   else                       color = (((u32) r)<<16)       | (((u32) g)<<8)      | ((u32) b) | 0xFF000000;
   return color;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0xf, 0x390790(%rip)    # 0x39f164
jne 0xe9fa
movl -0x4(%rbp), %eax
sarl $0x3, %eax
shll $0xa, %eax
movl -0x8(%rbp), %ecx
sarl $0x3, %ecx
shll $0x5, %ecx
orl %ecx, %eax
movl -0xc(%rbp), %ecx
sarl $0x3, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0xeab5
cmpl $0x10, 0x390763(%rip)   # 0x39f164
jne 0xea27
movl -0x4(%rbp), %eax
sarl $0x3, %eax
shll $0xb, %eax
movl -0x8(%rbp), %ecx
sarl $0x2, %ecx
shll $0x5, %ecx
orl %ecx, %eax
movl -0xc(%rbp), %ecx
sarl $0x3, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0xeab3
cmpl $0x12, 0x390736(%rip)   # 0x39f164
jne 0xea51
movl -0x4(%rbp), %eax
sarl $0x2, %eax
shll $0xc, %eax
movl -0x8(%rbp), %ecx
sarl $0x2, %ecx
shll $0x6, %ecx
orl %ecx, %eax
movl -0xc(%rbp), %ecx
sarl $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0xeab1
cmpl $0x18, 0x39070c(%rip)   # 0x39f164
jne 0xea70
movl -0x4(%rbp), %eax
shll $0x10, %eax
movl -0x8(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
orl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0xeaaf
cmpl $0x1e, 0x3906ed(%rip)   # 0x39f164
jne 0xea94
movl -0x4(%rbp), %eax
shll $0x14, %eax
movl -0x8(%rbp), %ecx
shll $0xa, %ecx
orl %ecx, %eax
movl -0xc(%rbp), %ecx
shll $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0xeaad
movl -0x4(%rbp), %eax
shll $0x10, %eax
movl -0x8(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
orl -0xc(%rbp), %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movl %eax, -0x10(%rbp)
jmp 0xeaaf
jmp 0xeab1
jmp 0xeab3
jmp 0xeab5
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: setup_palette()
void setup_palette()
{
int i;
int j;

   // initialize working palettes from the standard palette table

   j = 0;
   for(i=0; i<16; i++) {  // setup native device and .BMP file palettes
      palette[i] = RGB_NATIVE(cmap[i].r, cmap[i].g, cmap[i].b);

      bmp_pal[j++] = cmap[i].b;   // bitmap palette is BGRx format
      bmp_pal[j++] = cmap[i].g;
      bmp_pal[j++] = cmap[i].r;
      bmp_pal[j++] = 0;
   }

   bmp_pal[j++] = 0;    // bmp_yellow - special color used to print yellow on white background
   bmp_pal[j++] = 168;
   bmp_pal[j++] = 92;
   bmp_pal[j++] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jge 0xf1e6
movslq -0x4(%rbp), %rcx
leaq 0x1b0395(%rip), %rax    # 0x1bf480
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edi
movslq -0x4(%rbp), %rcx
leaq 0x1b0381(%rip), %rax    # 0x1bf480
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
movslq -0x4(%rbp), %rcx
leaq 0x1b036c(%rip), %rax    # 0x1bf480
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
callq 0xe9c0
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x1c1030(%rip), %rax    # 0x1d0160
movl %edx, (%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x1b0342(%rip), %rax    # 0x1bf480
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movb %al, %dl
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x3900e1(%rip), %rax    # 0x39f240
movb %dl, (%rax,%rcx)
movslq -0x4(%rbp), %rcx
leaq 0x1b0313(%rip), %rax    # 0x1bf480
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movb %al, %dl
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x3900b2(%rip), %rax    # 0x39f240
movb %dl, (%rax,%rcx)
movslq -0x4(%rbp), %rcx
leaq 0x1b02e4(%rip), %rax    # 0x1bf480
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movb %al, %dl
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x390084(%rip), %rax    # 0x39f240
movb %dl, (%rax,%rcx)
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x39006c(%rip), %rax    # 0x39f240
movb $0x0, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xf0d6
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x390045(%rip), %rax    # 0x39f240
movb $0x0, (%rax,%rcx)
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x39002c(%rip), %rax    # 0x39f240
movb $-0x58, (%rax,%rcx)
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x390013(%rip), %rax    # 0x39f240
movb $0x5c, (%rax,%rcx)
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x38fffa(%rip), %rax    # 0x39f240
movb $0x0, (%rax,%rcx)
addq $0x10, %rsp
popq %rbp
retq
// File: jkingan[P]ladyheather/heather.cpp
// Function: set_x11_color(unsigned char)
void set_x11_color(u08 color)
{
   // set the graphics context color

   if(color != last_x11_color) {  // color has changed, update context
      last_x11_color = color;
      if(color == 0xFF) XSetForeground(display, gc, RGB_NATIVE(0,0,35)); // special plot area background color highlight
      else              XSetForeground(display, gc, palette[color]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
movzbl 0x1aee2b(%rip), %ecx    # 0x1be0c4
cmpl %ecx, %eax
je 0xf30f
movb -0x1(%rbp), %al
movb %al, 0x1aee1e(%rip)     # 0x1be0c4
movzbl -0x1(%rbp), %eax
cmpl $0xff, %eax
jne 0xf2e8
movq 0x1c0de8(%rip), %rax    # 0x1d00a0
movq %rax, -0x18(%rbp)
movq 0x1c0dfd(%rip), %rax    # 0x1d00c0
movq %rax, -0x10(%rbp)
xorl %esi, %esi
movl $0x23, %edx
movl %esi, %edi
callq 0xe9c0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl %eax, %eax
movl %eax, %edx
callq 0x90d0
jmp 0xf30d
movq 0x1c0db1(%rip), %rdi    # 0x1d00a0
movq 0x1c0dca(%rip), %rsi    # 0x1d00c0
movzbl -0x1(%rbp), %eax
movl %eax, %ecx
leaq 0x1c0e5d(%rip), %rax    # 0x1d0160
movl (%rax,%rcx,4), %eax
movl %eax, %edx
callq 0x90d0
jmp 0xf30f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: add_kbd(int)
void add_kbd(int key)
{
   // add a keystroke to the keyboard queue

   last_kbd_jd = jd_utc;
   if(++kbd_in >= KBD_Q_SIZE) kbd_in = 0;
   if(kbd_in == kbd_out) {  // kbd queue is full
      if(--kbd_in < 0) kbd_in = KBD_Q_SIZE-1;
   }
   else {  // put keystoke in the queue
      kbd_queue[kbd_in] = key;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movsd 0x35d3e1(%rip), %xmm0   # 0x36c710
movsd %xmm0, 0x35d439(%rip)   # 0x36c770
movl 0x38fee7(%rip), %eax    # 0x39f224
addl $0x1, %eax
movl %eax, 0x38fede(%rip)    # 0x39f224
cmpl $0x10, %eax
jl 0xf355
movl $0x0, 0x38fecf(%rip)    # 0x39f224
movl 0x38fec9(%rip), %eax    # 0x39f224
cmpl 0x38fec7(%rip), %eax    # 0x39f228
jne 0xf383
movl 0x38febb(%rip), %eax    # 0x39f224
addl $-0x1, %eax
movl %eax, 0x38feb2(%rip)    # 0x39f224
cmpl $0x0, %eax
jge 0xf381
movl $0xf, 0x38fea3(%rip)    # 0x39f224
jmp 0xf397
movl -0x4(%rbp), %edx
movslq 0x38fe97(%rip), %rcx    # 0x39f224
leaq 0x38fe4c(%rip), %rax    # 0x39f1e0
movl %edx, (%rax,%rcx,4)
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: x11_getch()
int x11_getch(void)
{
int key;

   // get a keystroke from the keyboard queue

   if(kbd_in == kbd_out) return 0;            // no keys in the queue

   if(++kbd_out >= KBD_Q_SIZE) kbd_out = 0;   // get to next queue entry
   key = kbd_queue[kbd_out];                  // get keystroke from queue
   return key;                                // return it
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x38fe2a(%rip), %eax    # 0x39f224
cmpl 0x38fe28(%rip), %eax    # 0x39f228
jne 0xf40b
movl $0x0, -0x4(%rbp)
jmp 0xf443
movl 0x38fe17(%rip), %eax    # 0x39f228
addl $0x1, %eax
movl %eax, 0x38fe0e(%rip)    # 0x39f228
cmpl $0x10, %eax
jl 0xf429
movl $0x0, 0x38fdff(%rip)    # 0x39f228
movslq 0x38fdf8(%rip), %rcx    # 0x39f228
leaq 0x38fda9(%rip), %rax    # 0x39f1e0
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: set_title_bar(int)
void set_title_bar(int why)
{
unsigned i;

   // set program title bar to the string szAppName
   // use executable file name and unit_file_name if no szAppName string.

   if((szAppName[0] == 0) && unit_file_name) {
      strcpy(szAppName, unit_file_name);  // the device name
      szAppName[32] = 0;
      strupr(szAppName);

      if(1) {   // include the executable file name
         strcat(szAppName, " - ");
         strcpy(out, exe_name);
         out[255-32-3] = 0;
         strcat(szAppName, out);
      }
   }

   for(i=0; i<strlen(szAppName); i++) {
      if(szAppName[i] == '_') szAppName[i] = ' ';
   }

   #ifdef WINDOWS
      SetWindowText(hWnd, &szAppName[0]);
   #endif

   #ifdef USE_X11
      init_screen(3498);
   #endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movsbl 0x1ac92e(%rip), %eax    # 0x1bcc00
cmpl $0x0, %eax
jne 0x10347
cmpq $0x0, 0x1bfb89(%rip)    # 0x1cfe68
je 0x10347
movq 0x1bfb80(%rip), %rsi    # 0x1cfe68
leaq 0x1ac911(%rip), %rdi    # 0x1bcc00
callq 0x9350
movb $0x0, 0x1ac925(%rip)    # 0x1bcc20
leaq 0x1ac8fe(%rip), %rdi    # 0x1bcc00
callq 0x9890
leaq 0x1ac8f2(%rip), %rdi    # 0x1bcc00
leaq 0x15fb69(%rip), %rsi    # 0x16fe7e
callq 0x96a0
leaq 0x38b0df(%rip), %rdi    # 0x39b400
leaq 0x38ec98(%rip), %rsi    # 0x39efc0
callq 0x9350
movb $0x0, 0x38b1a8(%rip)    # 0x39b4dc
leaq 0x1ac8c5(%rip), %rdi    # 0x1bcc00
leaq 0x38b0be(%rip), %rsi    # 0x39b400
callq 0x96a0
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x10(%rbp)
leaq 0x1ac8a4(%rip), %rdi    # 0x1bcc00
callq 0x9120
movq %rax, %rcx
movq -0x10(%rbp), %rax
cmpq %rcx, %rax
jae 0x1039f
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x1ac887(%rip), %rax    # 0x1bcc00
movsbl (%rax,%rcx), %eax
cmpl $0x5f, %eax
jne 0x10392
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x1ac872(%rip), %rax    # 0x1bcc00
movb $0x20, (%rax,%rcx)
jmp 0x10394
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1034e
movl $0xdaa, %edi            # imm = 0xDAA
callq 0xd430
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heather.cpp
// Function: character_width(unsigned char)
int character_width(u08 c)
{
int h,w;
int p;

   // get the width of a (mono-spaced) VFX font character

   if(dot_font == 0) dot_font = &h_font_12[0];
   if(c > 127) c = ' ';  // char out of range

   h = dot_font[8];      // char height

   p = (4*4) + (c*4);    // index of offset to char definition
   p = (dot_font[p+1] * 256) + dot_font[p+0];  // pointer to char definition
   w = dot_font[p];      // char width
   return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
cmpq $0x0, 0x38ed06(%rip)    # 0x39f0c8
jne 0x103d2
leaq 0x1a1405(%rip), %rax    # 0x1b17d0
movq %rax, 0x38ecf6(%rip)    # 0x39f0c8
movzbl -0x1(%rbp), %eax
cmpl $0x7f, %eax
jle 0x103df
movb $0x20, -0x1(%rbp)
movq 0x38ece2(%rip), %rax    # 0x39f0c8
movzbl 0x8(%rax), %eax
movl %eax, -0x8(%rbp)
movzbl -0x1(%rbp), %eax
shll $0x2, %eax
addl $0x10, %eax
movl %eax, -0x10(%rbp)
movq 0x38ecc7(%rip), %rax    # 0x39f0c8
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq 0x38ecb0(%rip), %rcx    # 0x39f0c8
movl -0x10(%rbp), %edx
addl $0x0, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movl %eax, -0x10(%rbp)
movq 0x38ec97(%rip), %rax    # 0x39f0c8
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: vchar_stroke()
int vchar_stroke()
{
   // return vchar line width in pixels

   if(VCHAR_SCALE <= 1) return 1;
   else if(VCHAR_SCALE <= 3) return 2;
   else if(vc_font_scale > 100) return 2;
   else return (VCHAR_SCALE / 2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x1, 0x271da1(%rip)    # 0x28271c
jg 0x10986
movl $0x1, -0x4(%rbp)
jmp 0x109bb
cmpl $0x3, 0x271d8f(%rip)    # 0x28271c
jg 0x10998
movl $0x2, -0x4(%rbp)
jmp 0x109bb
cmpl $0x64, 0x271d85(%rip)   # 0x282724
jle 0x109aa
movl $0x2, -0x4(%rbp)
jmp 0x109bb
movl 0x271d6c(%rip), %eax    # 0x28271c
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: jkingan[P]ladyheather/heather.cpp
// Function: line(int, int, int, int, unsigned char)
void line(COORD x1,COORD y1, COORD x2,COORD y2, u08 color)
{
   // draw a single pixel width line on the screen

   SWAPXY(x1,y1);
   SWAPXY(x2,y2);

#ifdef WIN_VFX
   if(stage == 0) return;

   VFX_io_done = 1;
   VFX_line_draw(stage, x1,y1, x2,y2, LD_DRAW, palette[color]);
#endif


#ifdef USE_X11
   if(display == 0) return;

   set_x11_color(color);
   XDrawLine(display,win,gc, x1,y1, x2,y2);
   flush_x11();
#endif

#ifdef USE_SDL
   lineColor(display, x1,y1,x2,y2,get_sdl_color(color));
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %r8b, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movb %al, -0x11(%rbp)
cmpl $0x0, 0x267027(%rip)    # 0x277a08
je 0x10a0a
movl -0x8(%rbp), %eax
movl %eax, 0x267020(%rip)    # 0x277a0c
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl 0x267014(%rip), %eax    # 0x277a0c
movl %eax, -0x4(%rbp)
movl 0x266fe3(%rip), %eax    # 0x2779e4
subl $0x1, %eax
subl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, 0x266ff7(%rip)    # 0x277a08
je 0x10a3a
movl -0x10(%rbp), %eax
movl %eax, 0x266ff0(%rip)    # 0x277a0c
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl 0x266fe4(%rip), %eax    # 0x277a0c
movl %eax, -0xc(%rbp)
movl 0x266fb3(%rip), %eax    # 0x2779e4
subl $0x1, %eax
subl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpq $0x0, 0x1bf65e(%rip)    # 0x1d00a0
jne 0x10a46
jmp 0x10a7f
movzbl -0x11(%rbp), %edi
callq 0xf280
movq 0x1bf64a(%rip), %rdi    # 0x1d00a0
movq 0x1bf653(%rip), %rsi    # 0x1d00b0
movq 0x1bf65c(%rip), %rdx    # 0x1d00c0
movl -0x4(%rbp), %ecx
movl -0x8(%rbp), %r8d
movl -0xc(%rbp), %r9d
movl -0x10(%rbp), %eax
movl %eax, (%rsp)
callq 0x9610
callq 0xdfe0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: dot(int, int, unsigned char)
void dot(int x, int y, u08 color)
{
   // draw a pixel on the screen

   SWAPXY(x,y);

#ifdef WIN_VFX
   if(stage == 0) return;

   VFX_io_done = 1;
   VFX_pixel_write(stage, x,y, palette[color]);
#endif

#ifdef USE_X11
   if(display == 0) return;

   set_x11_color(color);
   XDrawPoint(display,win, gc, x,y);
   flush_x11();
#endif

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movb %al, -0x9(%rbp)
cmpl $0x0, 0x266c7e(%rip)    # 0x277a08
je 0x10db3
movl -0x8(%rbp), %eax
movl %eax, 0x266c77(%rip)    # 0x277a0c
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl 0x266c6b(%rip), %eax    # 0x277a0c
movl %eax, -0x4(%rbp)
movl 0x266c3a(%rip), %eax    # 0x2779e4
subl $0x1, %eax
subl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
cmpq $0x0, 0x1bf2e5(%rip)    # 0x1d00a0
jne 0x10dbf
jmp 0x10dee
movzbl -0x9(%rbp), %edi
callq 0xf280
movq 0x1bf2d1(%rip), %rdi    # 0x1d00a0
movq 0x1bf2da(%rip), %rsi    # 0x1d00b0
movq 0x1bf2e3(%rip), %rdx    # 0x1d00c0
movl -0x4(%rbp), %ecx
movl -0x8(%rbp), %r8d
callq 0x92b0
callq 0xdfe0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: deg_char(int, int, unsigned char)
int deg_char(COORD row, COORD col, u08 color)
{
   // erase the old character cell (and probably a little extra)
   erase_rectangle(col,row, TEXT_WIDTH,TEXT_HEIGHT);

   // draw the degrees symbol (which is not in the normal font)
   dot(col+2, row+0, color);
   dot(col+3, row+0, color);
   dot(col+1, row+1, color);
   dot(col+4, row+1, color);
   dot(col+1, row+2, color);
   dot(col+4, row+2, color);
   dot(col+2, row+3, color);
   dot(col+3, row+3, color);

   return DEG_WIDTH;  // width
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl -0x8(%rbp), %edi
movl -0x4(%rbp), %esi
movl 0x266bd1(%rip), %edx    # 0x2779f0
movl 0x266bcf(%rip), %ecx    # 0x2779f4
callq 0xf250
movl -0x8(%rbp), %edi
addl $0x2, %edi
movl -0x4(%rbp), %esi
addl $0x0, %esi
movzbl -0x9(%rbp), %edx
callq 0x10d70
movl -0x8(%rbp), %edi
addl $0x3, %edi
movl -0x4(%rbp), %esi
addl $0x0, %esi
movzbl -0x9(%rbp), %edx
callq 0x10d70
movl -0x8(%rbp), %edi
addl $0x1, %edi
movl -0x4(%rbp), %esi
addl $0x1, %esi
movzbl -0x9(%rbp), %edx
callq 0x10d70
movl -0x8(%rbp), %edi
addl $0x4, %edi
movl -0x4(%rbp), %esi
addl $0x1, %esi
movzbl -0x9(%rbp), %edx
callq 0x10d70
movl -0x8(%rbp), %edi
addl $0x1, %edi
movl -0x4(%rbp), %esi
addl $0x2, %esi
movzbl -0x9(%rbp), %edx
callq 0x10d70
movl -0x8(%rbp), %edi
addl $0x4, %edi
movl -0x4(%rbp), %esi
addl $0x2, %esi
movzbl -0x9(%rbp), %edx
callq 0x10d70
movl -0x8(%rbp), %edi
addl $0x2, %edi
movl -0x4(%rbp), %esi
addl $0x3, %esi
movzbl -0x9(%rbp), %edx
callq 0x10d70
movl -0x8(%rbp), %edi
addl $0x3, %edi
movl -0x4(%rbp), %esi
addl $0x3, %esi
movzbl -0x9(%rbp), %edx
callq 0x10d70
movl $0x6, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: erase_vchar(int, int)
void erase_vchar(int x, int y)
{
int i,j;

   // erase a vector graphics character

//   i = 0;
//   if(VCharThickness > 1) i = 1;
//   if(VCharThickness > 1) i = VCharThickness;
   i = VCharThickness;
   j = 0;
++i;

// if(VCharThickness > 1) ++j;
   erase_rectangle(x,y-j, VCharWidth+VCharThickness,VCharHeight+VCharThickness-i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
callq 0x10970
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x8(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x1, 0x2712e0(%rip)    # 0x28271c
jle 0x1144c
movl 0x2712d8(%rip), %eax    # 0x28271c
shll $0x3, %eax
movl %eax, -0x1c(%rbp)
jmp 0x11455
movl 0x26659e(%rip), %eax    # 0x2779f0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0x10970
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x20(%rbp)
cmpl $0x1, 0x2712ab(%rip)    # 0x28271c
jle 0x11481
movl 0x2712a3(%rip), %eax    # 0x28271c
shll $0x4, %eax
movl %eax, -0x28(%rbp)
jmp 0x1148a
movl 0x26656d(%rip), %eax    # 0x2779f4
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
callq 0x10970
movl -0x2c(%rbp), %ecx
movl -0x18(%rbp), %edi
movl -0x14(%rbp), %esi
movl -0x20(%rbp), %edx
addl %eax, %ecx
subl -0xc(%rbp), %ecx
callq 0xf250
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: xthick_line(int, int, int, int, unsigned char, unsigned char)
void xthick_line(COORD x1,COORD y1,  COORD x2,COORD y2, u08 color, u08 thickness)
{
COORD x,y;

   // draw a thick line on the screen (using single pixel wide lines)

   if(thickness <= 1) {
      return line(x1,y1, x2,y2, color);
   }

   for(x=0; x<thickness; x++) {
      for(y=0; y<thickness; y++) {
         line(x1+x,y1+y, x2+x,y2+y, color);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %r8d, -0x2c(%rbp)
movl %ecx, %eax
movl -0x2c(%rbp), %ecx
movl %eax, -0x28(%rbp)
movl %edx, %eax
movl -0x28(%rbp), %edx
movl %eax, -0x24(%rbp)
movl %esi, %eax
movl -0x24(%rbp), %esi
movl %eax, -0x20(%rbp)
movl %edi, %r8d
movl -0x20(%rbp), %edi
movb %r9b, %al
movl %r8d, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movb %al, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
cmpl $0x1, %eax
jg 0x11521
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movzbl -0x11(%rbp), %r8d
callq 0x109c0
jmp 0x1157f
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movzbl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jge 0x1157f
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movzbl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jge 0x11572
movl -0x4(%rbp), %edi
addl -0x18(%rbp), %edi
movl -0x8(%rbp), %esi
addl -0x1c(%rbp), %esi
movl -0xc(%rbp), %edx
addl -0x18(%rbp), %edx
movl -0x10(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movzbl -0x11(%rbp), %r8d
callq 0x109c0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1153a
jmp 0x11574
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x11528
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heather.cpp
// Function: vchar_string(int, int, unsigned char, char*)
void vchar_string(int row, int col, u08 color, char *s)
{
u08 c;
int i;

   // draw a text string using vector graphics characters

   if(1 && graphics_coords) {
   }
   else {
      row *= TEXT_HEIGHT;  //!!!!!!
      col *= TEXT_WIDTH;
      row += TEXT_Y_MARGIN;
      col += TEXT_X_MARGIN;
row += 2;
   }
   vc_col = col;
   vc_row = row;

   i = 0;
   while((c = *s++)) {  // to save time,  we only draw the chars that changed
      vchar(col, row, 1, color, c);
      if(i<(VSTRING_LEN-1)) ++i;
      col += VCharWidth;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rcx, -0x18(%rbp)
cmpb $0x0, 0x26649a(%rip)    # 0x277a48
je 0x115b2
jmp 0x115f2
movl 0x26643c(%rip), %eax    # 0x2779f4
imull -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x26642b(%rip), %eax    # 0x2779f0
imull -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl 0x266422(%rip), %eax    # 0x2779f4
shll $0x0, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x26640f(%rip), %eax    # 0x2779f0
shll %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %eax
movl %eax, 0x388f6d(%rip)    # 0x39a568
movl -0x4(%rbp), %eax
movl %eax, 0x388f60(%rip)    # 0x39a564
movl $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %al
movb %al, -0x19(%rbp)
cmpb $0x0, %al
je 0x1167b
movl -0x8(%rbp), %edi
movl -0x4(%rbp), %esi
movb -0x9(%rbp), %al
movl $0x1, %edx
movzbl %al, %ecx
movzbl -0x19(%rbp), %r8d
callq 0x10710
cmpl $0x80, -0x20(%rbp)
jge 0x11650
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x1, 0x2710c5(%rip)    # 0x28271c
jle 0x11667
movl 0x2710bd(%rip), %eax    # 0x28271c
shll $0x3, %eax
movl %eax, -0x24(%rbp)
jmp 0x11670
movl 0x266383(%rip), %eax    # 0x2779f0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0x1160b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)