// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: draw_pos_data_dump
static void draw_pos_data_dump(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (! file->show_data) return;

  // empty line above data
  move_cursor(1, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 1);
  clear_eol();

  // int8, int32, float32

  move_cursor(1, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 2);
  out("int8:  ");
  uint8_t data_u8;
  if (get_file_u8(file, file->cursor_pos, &data_u8)) {
    if (file->signedness == HED_DATA_SIGNED)
      out("%-3d      ", (int8_t) data_u8);
    else
      out("%-3u      ", data_u8);
  } else {
    out("%-3s", "-");
  }

  move_cursor(17, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 2);
  out("int32: ");
  uint32_t data_u32;
  if (get_file_u32(file, file->cursor_pos, &data_u32)) {
    if (file->signedness == HED_DATA_SIGNED)
      out("%-11d            ", (int32_t) data_u32);
    else
      out("%-11u            ", data_u32);
  } else {
    out("%-11s", "-");
  }

  move_cursor(47, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 2);
  out("float32: ");
  float data_f32;
  if (get_file_f32(file, file->cursor_pos, &data_f32)) {
    out("%g", data_f32);
  } else {
    out("-");
  }

  clear_eol();

  // int16, int64, float64

  move_cursor(1, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 3);
  out("int16: ");
  uint16_t data_u16;
  if (get_file_u16(file, file->cursor_pos, &data_u16)) {
    if (file->signedness == HED_DATA_SIGNED)
      out("%-6d   ", (int16_t) data_u16);
    else
      out("%-6u   ", data_u16);
  } else {
    out("%-6s", "-");
  }

  move_cursor(17, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 3);
  out("int64: ");
  uint64_t data_u64;
  if (get_file_u64(file, file->cursor_pos, &data_u64)) {
    if (file->signedness == HED_DATA_SIGNED)
      out("%-20" PRId64 "   ", (int64_t) data_u64);
    else
      out("%-20" PRIu64 "   ", data_u64);
  } else {
    out("%-20s", "-");
  }

  move_cursor(47, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 3);
  out("float64: ");
  double data_f64;
  if (get_file_f64(file, file->cursor_pos, &data_f64)) {
    out("%g", data_f64);
  } else {
    out("-");
  }

  clear_eol();

  // status line
  move_cursor(1, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 4);
  if (file->endianess == HED_DATA_LITTLE_ENDIAN) {
    set_color(FG_BLACK, BG_GRAY);
    out("[Little Endian]");
    reset_color();
    out(" ");
  } else {
    set_color(FG_BLACK, BG_GRAY);
    out("[Big Endian]");
    reset_color();
    out("    ");
  }
  move_cursor(17, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 4);
  if (file->signedness == HED_DATA_UNSIGNED) {
    set_color(FG_BLACK, BG_GRAY);
    out("[Unsigned]");
    reset_color();
    out("  ");
  } else {
    set_color(FG_BLACK, BG_GRAY);
    out("[Signed]");
    reset_color();
    out("    ");
  }
  clear_eol();

  // help line
  hed_draw_key_help(1 + 3*EDITOR_KEY_HELP_SPACING, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 4, "M-E", "Endianness");
  hed_draw_key_help(1 + 4*EDITOR_KEY_HELP_SPACING, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 4, "M-U", "(Un)Signed");

  // empty line
  move_cursor(1, scr->h - EDITOR_FOOTER_LINES - EDITOR_DATA_LINES + 5);
  clear_eol();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
testb $0x1, 0x29(%rax)
jne 0x7e9a
jmp 0x8364
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x1, %esi
movl $0x1, %edi
callq 0x3d80
callq 0x3d60
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x2, %esi
movl $0x1, %edi
callq 0x3d80
leaq 0x3700(%rip), %rdi      # 0xb5dc
movb $0x0, %al
callq 0x3850
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rsi
leaq 0x1f(%rsp), %rdx
callq 0x4360
testb $0x1, %al
jne 0x7f01
jmp 0x7f36
movq 0x20(%rsp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x7f21
movsbl 0x1f(%rsp), %esi
leaq 0x36cc(%rip), %rdi      # 0xb5e4
movb $0x0, %al
callq 0x3850
jmp 0x7f34
movzbl 0x1f(%rsp), %esi
leaq 0x36c2(%rip), %rdi      # 0xb5ef
movb $0x0, %al
callq 0x3850
jmp 0x7f4b
leaq 0x36bd(%rip), %rdi      # 0xb5fa
leaq 0x310b(%rip), %rsi      # 0xb04f
movb $0x0, %al
callq 0x3850
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x2, %esi
movl $0x11, %edi
callq 0x3d80
leaq 0x3692(%rip), %rdi      # 0xb5ff
movb $0x0, %al
callq 0x3850
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rsi
leaq 0x18(%rsp), %rdx
callq 0x4490
testb $0x1, %al
jne 0x7f92
jmp 0x7fc5
movq 0x20(%rsp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x7fb1
movl 0x18(%rsp), %esi
leaq 0x365f(%rip), %rdi      # 0xb607
movb $0x0, %al
callq 0x3850
jmp 0x7fc3
movl 0x18(%rsp), %esi
leaq 0x365d(%rip), %rdi      # 0xb619
movb $0x0, %al
callq 0x3850
jmp 0x7fda
leaq 0x365f(%rip), %rdi      # 0xb62b
leaq 0x307c(%rip), %rsi      # 0xb04f
movb $0x0, %al
callq 0x3850
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x2, %esi
movl $0x2f, %edi
callq 0x3d80
leaq 0x3635(%rip), %rdi      # 0xb631
movb $0x0, %al
callq 0x3850
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rsi
leaq 0x14(%rsp), %rdx
callq 0x47c0
testb $0x1, %al
jne 0x8021
jmp 0x803b
movss 0x14(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x3609(%rip), %rdi      # 0xb63b
movb $0x1, %al
callq 0x3850
jmp 0x8049
leaq 0x300d(%rip), %rdi      # 0xb04f
movb $0x0, %al
callq 0x3850
callq 0x3d60
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x3, %esi
movl $0x1, %edi
callq 0x3d80
leaq 0x35ce(%rip), %rdi      # 0xb63e
movb $0x0, %al
callq 0x3850
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rsi
leaq 0x12(%rsp), %rdx
callq 0x43c0
testb $0x1, %al
jne 0x8095
jmp 0x80ca
movq 0x20(%rsp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x80b5
movswl 0x12(%rsp), %esi
leaq 0x359a(%rip), %rdi      # 0xb646
movb $0x0, %al
callq 0x3850
jmp 0x80c8
movzwl 0x12(%rsp), %esi
leaq 0x358d(%rip), %rdi      # 0xb64e
movb $0x0, %al
callq 0x3850
jmp 0x80df
leaq 0x3585(%rip), %rdi      # 0xb656
leaq 0x2f77(%rip), %rsi      # 0xb04f
movb $0x0, %al
callq 0x3850
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x3, %esi
movl $0x11, %edi
callq 0x3d80
leaq 0x355a(%rip), %rdi      # 0xb65b
movb $0x0, %al
callq 0x3850
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rsi
leaq 0x8(%rsp), %rdx
callq 0x45b0
testb $0x1, %al
jne 0x8126
jmp 0x815b
movq 0x20(%rsp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x8146
movq 0x8(%rsp), %rsi
leaq 0x3526(%rip), %rdi      # 0xb663
movb $0x0, %al
callq 0x3850
jmp 0x8159
movq 0x8(%rsp), %rsi
leaq 0x351b(%rip), %rdi      # 0xb66d
movb $0x0, %al
callq 0x3850
jmp 0x8170
leaq 0x3515(%rip), %rdi      # 0xb677
leaq 0x2ee6(%rip), %rsi      # 0xb04f
movb $0x0, %al
callq 0x3850
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x3, %esi
movl $0x2f, %edi
callq 0x3d80
leaq 0x34eb(%rip), %rdi      # 0xb67d
movb $0x0, %al
callq 0x3850
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rsi
movq %rsp, %rdx
callq 0x48f0
testb $0x1, %al
jne 0x81b5
jmp 0x81ca
movsd (%rsp), %xmm0
leaq 0x347a(%rip), %rdi      # 0xb63b
movb $0x1, %al
callq 0x3850
jmp 0x81d8
leaq 0x2e7e(%rip), %rdi      # 0xb04f
movb $0x0, %al
callq 0x3850
callq 0x3d60
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x4, %esi
movl $0x1, %edi
callq 0x3d80
movq 0x20(%rsp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x8235
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
leaq 0x346e(%rip), %rdi      # 0xb687
movb $0x0, %al
callq 0x3850
callq 0x3d40
leaq 0x33eb(%rip), %rdi      # 0xb617
movb $0x0, %al
callq 0x3850
jmp 0x8265
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
leaq 0x344c(%rip), %rdi      # 0xb697
movb $0x0, %al
callq 0x3850
callq 0x3d40
leaq 0x33b6(%rip), %rdi      # 0xb614
movb $0x0, %al
callq 0x3850
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x4, %esi
movl $0x11, %edi
callq 0x3d80
movq 0x20(%rsp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x82bd
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
leaq 0x3403(%rip), %rdi      # 0xb6a4
movb $0x0, %al
callq 0x3850
callq 0x3d40
leaq 0x3362(%rip), %rdi      # 0xb616
movb $0x0, %al
callq 0x3850
jmp 0x82ed
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
leaq 0x33dc(%rip), %rdi      # 0xb6af
movb $0x0, %al
callq 0x3850
callq 0x3d40
leaq 0x332e(%rip), %rdi      # 0xb614
movb $0x0, %al
callq 0x3850
callq 0x3d60
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x4, %esi
movl $0x31, %edi
leaq 0x33a9(%rip), %rdx      # 0xb6b8
leaq 0x33a6(%rip), %rcx      # 0xb6bc
callq 0x6340
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x4, %esi
movl $0x41, %edi
leaq 0x338f(%rip), %rdx      # 0xb6c7
leaq 0x338c(%rip), %rcx      # 0xb6cb
callq 0x6340
movq 0x28(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x3, %esi
subl $0x5, %esi
addl $0x5, %esi
movl $0x1, %edi
callq 0x3d80
callq 0x3d60
addq $0x38, %rsp
retq
nopl (%rax)