LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: yhirose[P]fizzbuzzlang/fzbz.cc
// Function: Value::str[abi:cxx11]() const
string str() const {
    switch (v.index()) {
      case 0:
        return "nil";
      case 1:
        return get<bool>() ? "true" : "false";
      case 2:
        return to_string(get<long>());
      case 3:
        return string(get<string_view>());
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x80f60
movq %rax, %rcx
movq %rcx, -0x48(%rbp)
subq $0x3, %rax
ja 0xa061d
movq -0x48(%rbp), %rax
leaq 0x12d1(%rip), %rcx      # 0xa17c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x11(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0xa660
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq 0x21e2(%rip), %rsi      # 0xa26fe
callq 0x18be0
jmp 0xa0523
leaq -0x11(%rbp), %rdi
callq 0xa410
jmp 0xa061f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0xa410
jmp 0xa062c
movq -0x50(%rbp), %rdi
callq 0x13140
movb %al, %dl
leaq 0x21a5(%rip), %rcx      # 0xa2702
leaq 0x21a3(%rip), %rax      # 0xa2707
testb %dl, %dl
cmovneq %rcx, %rax
movq %rax, -0x78(%rbp)
leaq -0x25(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0xa660
movq -0x60(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x18be0
jmp 0xa058e
leaq -0x25(%rbp), %rdi
callq 0xa410
jmp 0xa061f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x25(%rbp), %rdi
callq 0xa410
jmp 0xa062c
movq -0x50(%rbp), %rdi
callq 0x133d0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0xa0640
jmp 0xa061f
movq -0x50(%rbp), %rdi
callq 0x824c0
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0xa660
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x25050
jmp 0xa05fb
leaq -0x39(%rbp), %rdi
callq 0xa410
jmp 0xa061f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x39(%rbp), %rdi
callq 0xa410
jmp 0xa062c
ud2
movq -0x58(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)
nop
// File: mh0fm4[P]SCDC/test/units/dataprov_hook/hook_cli.c
// Function: input_next
scdcint_t input_next(scdc_dataset_input_t *input, scdc_result_t *result)
{
  scdcint_t i = (intptr_t) input->data;


  printf(PREFIX "preparing INPUT #%" scdcint_fmt "\n", i);

  ((char *) SCDC_DATASET_INOUT_BUF_PTR(input))[0] = 0;

  SCDC_DATASET_INOUT_BUF_CURRENT(input) = 0;

  if (i >= 1) input->next = NULL;

  input->data = (void *) (intptr_t) (i + 1);

  return SCDC_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x7c7ed(%rip), %rdi     # 0x8a004
movb $0x0, %al
callq 0xcd10
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
cmpq $0x1, -0x18(%rbp)
jl 0xd848
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x18(%rbp), %rcx
addq $0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/dataprov_hook/hook_cli.c
// Function: output_next
scdcint_t output_next(scdc_dataset_output_t *output, scdc_result_t *result)
{
  scdcint_t i = (intptr_t) output->data;


  if (strcmp(output->format, "text") == 0 || strcmp(output->format, "fslist") == 0)
    printf(PREFIX "processing OUTPUT #%" scdcint_fmt ": '%.*s'\n", i, (int) SCDC_DATASET_INOUT_BUF_CURRENT(output), (char *) SCDC_DATASET_INOUT_BUF_PTR(output));
  else
    printf(PREFIX "processing OUTPUT #%" scdcint_fmt": %" scdcint_fmt " bytes\n", i, SCDC_DATASET_INOUT_BUF_CURRENT(output));

  output->data = (void *) (intptr_t) (i + 1);

  return SCDC_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x7c78e(%rip), %rsi     # 0x8a025
callq 0xc960
cmpl $0x0, %eax
je 0xd8b6
movq -0x8(%rbp), %rdi
leaq 0x7eea6(%rip), %rsi     # 0x8c752
callq 0xc960
cmpl $0x0, %eax
jne 0xd8dc
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
leaq 0x7c757(%rip), %rdi     # 0x8a02a
movb $0x0, %al
callq 0xcd10
jmp 0xd8f6
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
leaq 0x7c766(%rip), %rdi     # 0x8a055
movb $0x0, %al
callq 0xcd10
movq -0x18(%rbp), %rcx
addq $0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/dataprov_hook/hook_cli.c
// Function: do_dataset_cmd
void do_dataset_cmd(scdc_dataset_t dataset, const char *cmd)
{
  scdc_dataset_input_t input, output;
  int i;

#define DEFAULT_INPUT_BUF_SIZE   256
#define DEFAULT_OUTPUT_BUF_SIZE  256

  char input_buf[DEFAULT_INPUT_BUF_SIZE], output_buf[DEFAULT_OUTPUT_BUF_SIZE];


  /* prepare command input */
  scdc_dataset_input_unset(&input);

  strcpy(input.format, "data");

  SCDC_DATASET_INOUT_BUF_PTR(&input) = input_buf;
  SCDC_DATASET_INOUT_BUF_SIZE(&input) = DEFAULT_INPUT_BUF_SIZE;
  SCDC_DATASET_INOUT_BUF_CURRENT(&input) = 0;
  input.total_size = 0;
  input.total_size_given = SCDC_DATASET_INOUT_TOTAL_SIZE_GIVEN_AT_LEAST;

  input.next = input_next;
  input.data = (void *) 0;

  input.next(&input, 0);

  /* prepare command output */
  scdc_dataset_output_unset(&output);

  SCDC_DATASET_INOUT_BUF_PTR(&output) = output_buf;
  SCDC_DATASET_INOUT_BUF_SIZE(&output) = DEFAULT_OUTPUT_BUF_SIZE;

  output.next = 0;
  output.data = (void *) 0;

  scdcint_t ret = scdc_dataset_cmd(dataset, cmd, &input, &output);

  /* process output */
  i = 0;
  do {
    void *data = output.data;
    output.data = (void *) (intptr_t) i;

    output_next(&output, 0);

    i = (intptr_t) output.data;
    output.data = data;

    if (!output.next) break;

#if 0
    printf(PREFIX "Press <Enter>");
    getchar();
#endif

    output.next(&output, 0);

  } while (1);

  printf(PREFIX "command '%s' %s!\n", cmd, ((ret == SCDC_SUCCESS)?"success":"failed"));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2fd80
leaq -0x68(%rbp), %rdi
leaq 0x7c73d(%rip), %rsi     # 0x8a084
callq 0xc600
leaq -0x1d0(%rbp), %rax
movq %rax, -0x58(%rbp)
movq $0x100, -0x50(%rbp)     # imm = 0x100
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x6c, -0x38(%rbp)
leaq -0x18a(%rip), %rax      # 0xd7f0
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
leaq -0x68(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq *-0x30(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x2fda0
leaq -0x2d0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x100, -0xa8(%rbp) # imm = 0x100
movq $0x0, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
movb $0x0, %al
callq 0x10730
movq %rax, -0x2d8(%rbp)
movl $0x0, -0xc4(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x2e0(%rbp)
movslq -0xc4(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0xc0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd870
movq -0x80(%rbp), %rax
movl %eax, -0xc4(%rbp)
movq -0x2e0(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0xda3b
jmp 0xda54
leaq -0xc0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq *-0x88(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0xd9f4
jmp 0xda54
movq -0x10(%rbp), %rsi
movq -0x2d8(%rbp), %rcx
leaq 0x7e821(%rip), %rdx     # 0x8c287
leaq 0x7c638(%rip), %rax     # 0x8a0a5
cmpq $0x1, %rcx
cmoveq %rax, %rdx
leaq 0x7c60d(%rip), %rdi     # 0x8a089
movb $0x0, %al
callq 0xcd10
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
nopl (%rax)
// File: cpearce[P]OggIndex/src/OggIndexValid.cpp
// Function: main
int main(int argc, char** argv) 
{
  if (argc != 2) {
    PrintUsage();
    return -1;
  }
  bool valid = ValidateIndexedOgg(string(argv[1]));
  cout << "Index is " << (valid ? "" : "NOT ") << "valid" << endl;
  return valid ? 0 : -1;
}

// Assembly:
subq $0x68, %rsp
movl $0x0, 0x64(%rsp)
movl %edi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
cmpl $0x2, 0x60(%rsp)
je 0xc64e
callq 0xc760
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xc74c
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x47a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0xc7f0
jmp 0xc681
leaq 0x30(%rsp), %rdi
callq 0x142b0
movb %al, 0x7(%rsp)
jmp 0xc691
leaq 0x30(%rsp), %rdi
callq 0x4260
leaq 0x2f(%rsp), %rdi
callq 0x4440
movb 0x7(%rsp), %al
andb $0x1, %al
movb %al, 0x57(%rsp)
movq 0x1791a(%rip), %rdi     # 0x23fd0
leaq 0xe1c6(%rip), %rsi      # 0x1a883
callq 0x43c0
movq %rax, %rdi
movb 0x57(%rsp), %cl
leaq 0xe1bd(%rip), %rsi      # 0x1a88d
leaq 0xea5b(%rip), %rax      # 0x1b132
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x43c0
movq %rax, %rdi
leaq 0xe207(%rip), %rsi      # 0x1a8f4
callq 0x43c0
movq %rax, %rdi
movq 0x178c4(%rip), %rsi     # 0x23fc0
callq 0x4420
movb 0x57(%rsp), %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x64(%rsp)
jmp 0xc74c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0xc740
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x4260
leaq 0x2f(%rsp), %rdi
callq 0x4440
jmp 0xc755
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x4790
nop
// File: cpearce[P]OggIndex/src/OggIndexValid.cpp
// Function: PrintUsage()
static void
PrintUsage() {
  cout << "OggIndexValid " << VERSION << endl
       << endl
       << "Usage:" << endl
       << "  OggIndexValid <in filename>" << endl
       << endl;
  
}

// Assembly:
pushq %rax
movq 0x17868(%rip), %rdi     # 0x23fd0
leaq 0xe123(%rip), %rsi      # 0x1a892
callq 0x43c0
movq %rax, %rdi
leaq 0xe123(%rip), %rsi      # 0x1a8a1
callq 0x43c0
movq %rax, %rdi
movq 0x17833(%rip), %rsi     # 0x23fc0
callq 0x4420
movq %rax, %rdi
movq 0x17824(%rip), %rsi     # 0x23fc0
callq 0x4420
movq %rax, %rdi
leaq 0xe100(%rip), %rsi      # 0x1a8ab
callq 0x43c0
movq %rax, %rdi
movq 0x17806(%rip), %rsi     # 0x23fc0
callq 0x4420
movq %rax, %rdi
leaq 0xe0e9(%rip), %rsi      # 0x1a8b2
callq 0x43c0
movq %rax, %rdi
movq 0x177e8(%rip), %rsi     # 0x23fc0
callq 0x4420
movq %rax, %rdi
movq 0x177d9(%rip), %rsi     # 0x23fc0
callq 0x4420
popq %rax
retq
nop
// File: narula[P]skiplists/skiplist.cc
// Function: SkipList::SkipList(int, int)
SkipList::SkipList(int prob, int maxl) {
  head = new node();
  tail = new node();
  probability = prob;
  max_level = maxl;
  if (max_level == 0) max_level = 1;
  if (max_level > MAX_LEVEL) max_level = MAX_LEVEL;
  head->key = -1;
  head->topLevel = max_level;
  tail->key = INT_MAX;
  tail->topLevel = max_level;
  for (int i = 0; i < MAX_LEVEL; i++) {
	head->nexts[i].nxt = tail;
	head->nexts[i].prefix = INT_MAX;
  }
  count = 0;
  pointer_follows = 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x148, %edi            # imm = 0x148
callq 0x10b0
movq %rax, %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x148, %edx            # imm = 0x148
callq 0x1050
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movl $0x148, %edi            # imm = 0x148
callq 0x10b0
movq %rax, %rdi
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
movl $0x148, %edx            # imm = 0x148
callq 0x1050
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0x2c(%rsp), %ecx
movl %ecx, 0x10(%rax)
movl 0x28(%rsp), %ecx
movl %ecx, 0x14(%rax)
cmpl $0x0, 0x14(%rax)
jne 0x1292
movq 0x18(%rsp), %rax
movl $0x1, 0x14(%rax)
movq 0x18(%rsp), %rax
cmpl $0x14, 0x14(%rax)
jle 0x12a9
movq 0x18(%rsp), %rax
movl $0x14, 0x14(%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movl 0x14(%rax), %edx
movq (%rax), %rcx
movl %edx, 0x4(%rcx)
movq 0x8(%rax), %rcx
movl $0x7fffffff, (%rcx)     # imm = 0x7FFFFFFF
movl 0x14(%rax), %ecx
movq 0x8(%rax), %rax
movl %ecx, 0x4(%rax)
movl $0x0, 0x24(%rsp)
cmpl $0x14, 0x24(%rsp)
jge 0x1329
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
movq (%rax), %rcx
addq $0x8, %rcx
movslq 0x24(%rsp), %rsi
shlq $0x4, %rsi
addq %rsi, %rcx
movq %rdx, 0x8(%rcx)
movq (%rax), %rax
addq $0x8, %rax
movslq 0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x7fffffff, (%rax)     # imm = 0x7FFFFFFF
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x12dc
movq 0x18(%rsp), %rax
movl $0x0, 0x1c(%rax)
movl $0x0, 0x18(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: narula[P]skiplists/skiplist.cc
// Function: SkipList::lookup(int)
int SkipList::lookup(int key) {
  if (findNodeFast(key) >= 0) {
	return 1;
  } else {
	return 0;
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x1410
cmpl $0x0, %eax
jl 0x13fa
movl $0x1, 0x14(%rsp)
jmp 0x1402
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: narula[P]skiplists/skiplist.cc
// Function: SkipList::findNodeFast(int)
int SkipList::findNodeFast(int key) {
  node* pred = head;
  inc();
  for (int level = pred->topLevel-1; level >= 0; level--) {
	node* curr = pred->nexts[level].nxt;
	while (key > pred->nexts[level].prefix) {
	  pred = curr; 
	  curr = pred->nexts[level].nxt;
	  inc();
	}
	if (key == pred->nexts[level].prefix) {
	  return level;
	}
  }
  return -1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, (%rsp)
movq (%rdi), %rax
movq %rax, 0x18(%rsp)
callq 0x2350
movq 0x18(%rsp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jl 0x14f4
movq 0x18(%rsp), %rax
addq $0x8, %rax
movslq 0x14(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %eax
movq 0x18(%rsp), %rcx
addq $0x8, %rcx
movslq 0x14(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jle 0x14bb
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movslq 0x14(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x2350
jmp 0x146b
movl 0x24(%rsp), %eax
movq 0x18(%rsp), %rcx
addq $0x8, %rcx
movslq 0x14(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x14e2
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x14fc
jmp 0x14e4
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1442
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: narula[P]skiplists/skiplist.cc
// Function: randomLevel(int, int)
int randomLevel(int max, int probability) {
  unsigned long long x = rand();
  int toplayer = 1;
  switch (probability) {
  case 4:
	while((x & 3) == 3){
	  toplayer += 1;
	  x >>= 2;
	}
	break;
  case 8:
	while((x & 7) == 7){
	  toplayer += 1;
	  x >>= 3;
	}
	break;
  case 16:
	while((x & 15) == 15){
	  toplayer += 1;
	  x >>= 4;
	}
	break;
  case 32:
	while((x & 31) == 31){
	  toplayer += 1;
	  x >>= 5;
	}
	break;
  default:
	while((x & 1) != 0) {
	  toplayer += 1;
	  x >>= 1;
	}
	break;
  }
  if(toplayer > max)
	toplayer = max;
  return toplayer;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
callq 0x1040
cltq
movq %rax, 0x18(%rsp)
movl $0x1, 0x14(%rsp)
movl 0x20(%rsp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x1c, %eax
ja 0x161a
movq 0x8(%rsp), %rax
leaq 0x1ab1(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x155e
movq 0x18(%rsp), %rax
andq $0x3, %rax
cmpq $0x3, %rax
jne 0x1588
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
shrq $0x2, %rax
movq %rax, 0x18(%rsp)
jmp 0x155e
jmp 0x1647
jmp 0x158f
movq 0x18(%rsp), %rax
andq $0x7, %rax
cmpq $0x7, %rax
jne 0x15b9
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
shrq $0x3, %rax
movq %rax, 0x18(%rsp)
jmp 0x158f
jmp 0x1647
jmp 0x15c0
movq 0x18(%rsp), %rax
andq $0xf, %rax
cmpq $0xf, %rax
jne 0x15ea
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
shrq $0x4, %rax
movq %rax, 0x18(%rsp)
jmp 0x15c0
jmp 0x1647
jmp 0x15ee
movq 0x18(%rsp), %rax
andq $0x1f, %rax
cmpq $0x1f, %rax
jne 0x1618
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
shrq $0x5, %rax
movq %rax, 0x18(%rsp)
jmp 0x15ee
jmp 0x1647
jmp 0x161c
movq 0x18(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1645
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
shrq %rax
movq %rax, 0x18(%rsp)
jmp 0x161c
jmp 0x1647
movl 0x14(%rsp), %eax
cmpl 0x24(%rsp), %eax
jle 0x1659
movl 0x24(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: narula[P]skiplists/skiplist.cc
// Function: SkipList::findNode(int, node**, node**)
int SkipList::findNode(int key, node* preds[], node* succs[]) {
  int lFound = -1;
  node* pred = head;
  inc();
  for (int level = pred->topLevel-1; level >= 0; level--) {
	node* curr = pred->nexts[level].nxt;
	while (key > pred->nexts[level].prefix) {
	  pred = curr; 
	  curr = pred->nexts[level].nxt;
	  inc();
	}
	if (lFound == -1 && key == pred->nexts[level].prefix) {
	  lFound = level;
	}
	preds[level] = pred;
	succs[level] = curr;
  }
  return lFound;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, (%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movq (%rdi), %rax
movq %rax, 0x18(%rsp)
callq 0x2350
movq 0x18(%rsp), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jl 0x178f
movq 0x18(%rsp), %rax
addq $0x8, %rax
movslq 0x14(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x3c(%rsp), %eax
movq 0x18(%rsp), %rcx
addq $0x8, %rcx
movslq 0x14(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jle 0x172d
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movslq 0x14(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x2350
jmp 0x16dd
cmpl $-0x1, 0x24(%rsp)
jne 0x1759
movl 0x3c(%rsp), %eax
movq 0x18(%rsp), %rcx
addq $0x8, %rcx
movslq 0x14(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x1759
movl 0x14(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rax
movslq 0x14(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rdx
movq 0x28(%rsp), %rax
movslq 0x14(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x16b4
movl 0x24(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: narula[P]skiplists/skiplist.cc
// Function: SkipList::insert(int)
int SkipList::insert(int key) {
  node *preds[max_level], *succs[max_level];
  int lFound = findNode(key, preds, succs);
  if (lFound != -1) {
	node* found = succs[lFound];
	return 0;
  }
  node* add = new node();
  add->key = key;
  int topLevel = randomLevel(max_level, probability);
  add->topLevel = topLevel;
  for (int i = 0; i < topLevel; i++) {
	add->nn(i)->nxt = succs[i];
	add->nn(i)->prefix = succs[i]->key;
	preds[i]->nn(i)->nxt = add;
	preds[i]->nn(i)->prefix = key;
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x70(%rbp)
movl 0x14(%rdi), %eax
movq %rsp, %rcx
movq %rcx, -0x20(%rbp)
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rdx
subq %rcx, %rdx
movq %rdx, -0x68(%rbp)
movq %rdx, %rsp
movq %rax, -0x28(%rbp)
movl 0x14(%rdi), %eax
leaq 0xf(,%rax,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rcx
subq %rsi, %rcx
movq %rcx, -0x60(%rbp)
movq %rcx, %rsp
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %esi
callq 0x1670
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
je 0x1835
movq -0x60(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x4(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x1952
movl $0x148, %edi            # imm = 0x148
callq 0x10b0
movq %rax, %rdi
movq %rdi, -0x78(%rbp)
xorl %esi, %esi
movl $0x148, %edx            # imm = 0x148
callq 0x1050
movq -0x78(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, -0x50(%rbp)
movl -0x14(%rbp), %edx
movq -0x50(%rbp), %rcx
movl %edx, (%rcx)
movl 0x14(%rax), %edi
movl 0x10(%rax), %esi
callq 0x1510
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x4(%rax)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x1944
movq -0x60(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rdi
movl -0x58(%rbp), %esi
callq 0x2380
movq -0x98(%rbp), %rdx
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rdx, 0x8(%rcx)
movslq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
movq -0x50(%rbp), %rdi
movl -0x58(%rbp), %esi
callq 0x2380
movl -0x8c(%rbp), %edx
movq %rax, %rcx
movq -0x68(%rbp), %rax
movl %edx, (%rcx)
movq -0x50(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movslq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x58(%rbp), %esi
callq 0x2380
movq -0x88(%rbp), %rdx
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rdx, 0x8(%rcx)
movl -0x14(%rbp), %ecx
movl %ecx, -0x7c(%rbp)
movslq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x58(%rbp), %esi
callq 0x2380
movl -0x7c(%rbp), %ecx
movl %ecx, (%rax)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1886
movl $0x1, -0x4(%rbp)
movl $0x1, -0x44(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: narula[P]skiplists/skiplist.cc
// Function: SkipList::print_skiplist()
void SkipList::print_skiplist() {
  node* ptr = head;
  int i = 0;
  while (ptr != 0) {
	printf("[N:%04d K:%04d ML:%d]  ", i, ptr->key, ptr->topLevel);
	i++;
	ptr = ptr->nn(i)->nxt;
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x19db
movl 0x4(%rsp), %esi
movq 0x8(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rax
movl 0x4(%rax), %ecx
leaq 0x16c8(%rip), %rdi      # 0x3078
movb $0x0, %al
callq 0x1030
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x2380
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x198e
addq $0x18, %rsp
retq
// File: narula[P]skiplists/skiplist.cc
// Function: SkipList::init_list(int, int, int)
SkipList* SkipList::init_list(int sz, int high, int probability) {
  int maxl = floor(log(sz)/log(probability));
  SkipList* skip = new SkipList(probability, maxl);
  int count = 0;
  while (count < sz) {
	if (skip->insert(rand() % high) > 0) {
	  count++;
	}
  }
  return skip;
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x44(%rsp)
movl %esi, 0x40(%rsp)
movl %edx, 0x3c(%rsp)
movl 0x44(%rsp), %edi
callq 0x23a0
movsd %xmm0, 0x10(%rsp)
movl 0x3c(%rsp), %edi
callq 0x23a0
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x10e0
cvttsd2si %xmm0, %eax
movl %eax, 0x38(%rsp)
movl $0x20, %edi
callq 0x10b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
callq 0x1200
jmp 0x1cc6
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0x1d35
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x1040
movq 0x8(%rsp), %rdi
cltd
idivl 0x40(%rsp)
movl %edx, %esi
callq 0x17a0
cmpl $0x0, %eax
jle 0x1d33
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x1d33
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl $0x20, %esi
callq 0x10c0
jmp 0x1d3f
jmp 0x1cd8
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x10f0
nopl (%rax)
// File: jakubsvehla[P]hex/src/editor.cpp
// Function: Editor::~Editor()
Editor::~Editor ()
{

  delete m_CmdLineView;
  delete m_FileView;
  delete m_File;
  delete m_CmdMode;
  delete m_NormalMode;
  delete m_InsertMode;
  delete m_Config;

  endwin();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x37ac
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x37c8
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x37e4
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x3800
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x381c
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x3838
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x3858
movq -0x48(%rbp), %rdi
movl $0x8, %esi
callq 0x32d0
callq 0x33c0
jmp 0x385f
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x3b80
nopl (%rax)
// File: jakubsvehla[P]hex/src/cli.cpp
// Function: CLI::Run(int, char**)
void CLI::Run (int argc, char ** argv)
{
  Editor editor;

  if (argc < 2) Usage(EXIT_FAILURE);

  // Handle special options --help and --version
  if (strcmp(argv[1], "-h") == 0 ||
      strcmp(argv[1], "--help") == 0) Usage(EXIT_SUCCESS);

  if (strcmp(argv[1], "-v") == 0 ||
      strcmp(argv[1], "--version") == 0) Version();

  // Initialize editor
  editor.Init();

  editor.OpenFile(argv[1]);

  // Start editor
  editor.Run();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3770
cmpl $0x2, -0xc(%rbp)
jge 0x3be9
movq -0x78(%rbp), %rdi
movl $0x1, %esi
callq 0x3cb0
jmp 0x3bcd
jmp 0x3be9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3780
jmp 0x3ca4
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x4413(%rip), %rsi      # 0x800b
callq 0x3460
cmpl $0x0, %eax
je 0x3c1b
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x43fd(%rip), %rsi      # 0x800e
callq 0x3460
cmpl $0x0, %eax
jne 0x3c2a
movq -0x78(%rbp), %rdi
xorl %esi, %esi
callq 0x3cb0
jmp 0x3c28
jmp 0x3c2a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x43dc(%rip), %rsi      # 0x8015
callq 0x3460
cmpl $0x0, %eax
je 0x3c5c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x43c6(%rip), %rsi      # 0x8018
callq 0x3460
cmpl $0x0, %eax
jne 0x3c69
movq -0x78(%rbp), %rdi
callq 0x3cf0
jmp 0x3c67
jmp 0x3c69
leaq -0x60(%rbp), %rdi
callq 0x3870
jmp 0x3c74
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x60(%rbp), %rdi
callq 0x3ae0
jmp 0x3c87
leaq -0x60(%rbp), %rdi
callq 0x3b20
jmp 0x3c92
leaq -0x60(%rbp), %rdi
callq 0x3780
addq $0x80, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x3540
nopl (%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::~File()
File::~File ()
{
  Byte * tmp;

  while (m_Head) {
    tmp = m_Head;
    m_Head = m_Head -> m_Next;
    delete tmp;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x7b9d(%rip), %rcx      # 0xba78
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x3f23
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x20(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3f21
movq -0x20(%rbp), %rdi
movl $0x18, %esi
callq 0x32d0
jmp 0x3ee2
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
callq 0x31c0
movq -0x18(%rbp), %rdi
callq 0x6550
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Open(char const*)
bool File::Open (const char * name)
{
  FILE * f;
  int c;

  // TODO handle errors and throw exceptions

  m_FileName = name;

  f = fopen(name, "ab+");
  fseek(f, 0, SEEK_SET);

  while ((c = fgetc(f)) != EOF)
    Ins(c);

  fclose(f);

  Seek(0);

  m_Saved = true;
  NotifyObservers();

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rsi
addq $0x38, %rdi
callq 0x3440
movq -0x10(%rbp), %rdi
leaq 0x41d9(%rip), %rsi      # 0x8179
callq 0x33d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x3370
movq -0x18(%rbp), %rdi
callq 0x34d0
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
je 0x3fda
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %eax
movzbl %al, %esi
callq 0x4010
jmp 0x3fb8
movq -0x18(%rbp), %rdi
callq 0x32b0
movq -0x28(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x4110
movq -0x28(%rbp), %rdi
movb $0x1, 0x5c(%rdi)
callq 0x65b0
movb $0x1, %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Ins(unsigned char)
void File::Ins (const unsigned char c)
{
  Byte * byte = new Byte(c);

  if (m_Mark == m_Head) {
    byte -> m_Next = m_Mark;

    m_Mark -> m_Prev = byte;
    m_Head = byte;
  }
  else {
    byte -> m_Next = m_Mark;
    byte -> m_Prev = m_Mark -> m_Prev;

    byte -> m_Next -> m_Prev = byte;
    byte -> m_Prev -> m_Next = byte;
  }

  m_Version ++;
  m_Saved = false;
  NotifyObservers();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x18, %edi
callq 0x32c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movzbl -0x9(%rbp), %esi
callq 0x3da0
jmp 0x4049
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x30(%rcx), %rax
cmpq 0x20(%rcx), %rax
jne 0x40a1
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x18(%rbp), %rcx
movq %rdx, 0x8(%rcx)
movq -0x18(%rbp), %rdx
movq 0x30(%rax), %rcx
movq %rdx, 0x10(%rcx)
movq -0x18(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x40e1
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x18, %esi
callq 0x32d0
jmp 0x40fd
movq -0x38(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x18(%rbp), %rcx
movq %rdx, 0x8(%rcx)
movq 0x30(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rdi
movl 0x58(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x58(%rdi)
movb $0x0, 0x5c(%rdi)
callq 0x65b0
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3540
nopw %cs:(%rax,%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Seek(int, int)
bool File::Seek (int offset, int whence)
{
  int    i;
  Byte * tmp;

  tmp = m_Mark;

  if (whence == SEEK_SET) {
    m_Mark = m_Head;
  }

  for (i = 0; i < abs(offset); i ++) {

    if (offset < 0) {
      m_Mark = m_Mark -> m_Prev;
    }
    else {
      m_Mark = m_Mark -> m_Next;
    }

    if (m_Mark == NULL) {
      m_Mark = tmp;
      return false;
    }
  }

  NotifyObservers();

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x4144
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x30(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x14(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
cmpl %ecx, %eax
jge 0x41ae
cmpl $0x0, -0x14(%rbp)
jge 0x4174
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x30(%rax)
jmp 0x4184
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x30(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x41a1
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x30(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x41bb
jmp 0x41a3
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x414b
movq -0x30(%rbp), %rdi
callq 0x65b0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Save()
bool File::Save ()
{
  FILE * f;
  unsigned char c;
  int pos;

  pos = Tell();

  // TODO handle errors and throw exceptions

  if (m_FileName.empty()) return false;

  f = fopen(m_FileName.c_str(), "wb");

  Seek(0);
  while (!Eof()) {
    Get(c);
    fputc(c, f);
  }

  fclose(f);

  m_Saved = true;

  Seek(pos, SEEK_SET);

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x4290
movq -0x28(%rbp), %rdi
movl %eax, -0x20(%rbp)
addq $0x38, %rdi
callq 0x3500
testb $0x1, %al
jne 0x41ff
jmp 0x4205
movb $0x0, -0x1(%rbp)
jmp 0x427e
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
callq 0x3160
movq %rax, %rdi
leaq 0x3f61(%rip), %rsi      # 0x817d
callq 0x33d0
movq -0x28(%rbp), %rdi
movq %rax, -0x18(%rbp)
xorl %edx, %edx
movl %edx, %esi
callq 0x4110
movq -0x28(%rbp), %rdi
callq 0x42e0
xorb $-0x1, %al
testb $0x1, %al
jne 0x4243
jmp 0x425f
movq -0x28(%rbp), %rdi
leaq -0x19(%rbp), %rsi
callq 0x4310
movzbl -0x19(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x3420
jmp 0x4232
movq -0x18(%rbp), %rdi
callq 0x32b0
movq -0x28(%rbp), %rdi
movb $0x1, 0x5c(%rdi)
movl -0x20(%rbp), %esi
xorl %edx, %edx
callq 0x4110
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Tell() const
int File::Tell () const
{
  int i;
  Byte * tmp = m_Head;

  for (i = 0; tmp != m_Mark; i ++) {
    tmp = tmp -> m_Next;
  }

  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq 0x30(%rcx), %rax
je 0x42d4
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x42af
movl -0xc(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Get(unsigned char&)
bool File::Get (unsigned char & c)
{
  if (Eof()) return false;

  c = m_Mark -> m_Val;
  m_Mark = m_Mark -> m_Next;

  NotifyObservers();

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x42e0
testb $0x1, %al
jne 0x4333
jmp 0x4339
movb $0x0, -0x1(%rbp)
jmp 0x435e
movq -0x20(%rbp), %rdi
movq 0x30(%rdi), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rdi)
callq 0x65b0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Del()
void File::Del (void)
{
  Byte * tmp;

  if (Eof()) {
    return;
  }

  tmp = m_Mark;
  m_Mark = m_Mark -> m_Next;

  if (tmp == m_Head) {
    m_Head = m_Head -> m_Next;
    m_Head -> m_Prev = NULL;
    delete tmp;
  }
  else {
    tmp -> m_Prev -> m_Next = tmp -> m_Next;
    tmp -> m_Next -> m_Prev = tmp -> m_Prev;
    delete tmp;
  }

  m_Version ++;
  m_Saved = false;
  NotifyObservers();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x42e0
testb $0x1, %al
jne 0x438f
jmp 0x4394
jmp 0x444c
movq -0x18(%rbp), %rcx
movq 0x30(%rcx), %rax
movq %rax, -0x10(%rbp)
movq 0x30(%rcx), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rcx)
movq -0x10(%rbp), %rax
cmpq 0x20(%rcx), %rax
jne 0x43f0
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq 0x20(%rax), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x43ee
movq -0x20(%rbp), %rdi
movl $0x18, %esi
callq 0x32d0
jmp 0x4436
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x4434
movq -0x28(%rbp), %rdi
movl $0x18, %esi
callq 0x32d0
jmp 0x4436
movq -0x18(%rbp), %rdi
movl 0x58(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x58(%rdi)
movb $0x0, 0x5c(%rdi)
callq 0x65b0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Read(int, int, unsigned char*) const
int File::Read (int offset, int n, unsigned char * buffer) const
{
  Byte  * tmp;
  int     i;

  tmp = m_Head;

  for (i = 0; i < offset; i ++) {
    if (tmp == m_Tail) return 0;
    tmp = tmp -> m_Next;
  }

  for (i = 0; i < n; i ++) {
    if (tmp == m_Tail) break;
    buffer[i] = tmp -> m_Val;
    tmp = tmp -> m_Next;
  }

  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x44bf
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
cmpq 0x28(%rcx), %rax
jne 0x44a8
movl $0x0, -0x4(%rbp)
jmp 0x450c
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4489
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x4506
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
cmpq 0x28(%rcx), %rax
jne 0x44de
jmp 0x4506
movq -0x28(%rbp), %rax
movb (%rax), %dl
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x44c6
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jakubsvehla[P]hex/src/file.cpp
// Function: File::Put(unsigned char)
bool File::Put (const unsigned char c)
{
  if (Eof()) return false;
  m_Mark -> m_Val = c;
  m_Mark = m_Mark -> m_Next;

  m_Version ++;
  m_Saved = false;
  NotifyObservers();

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x42e0
testb $0x1, %al
jne 0x4545
jmp 0x454b
movb $0x0, -0x1(%rbp)
jmp 0x457a
movq -0x20(%rbp), %rdi
movb -0x11(%rbp), %cl
movq 0x30(%rdi), %rax
movb %cl, (%rax)
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rdi)
movl 0x58(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x58(%rdi)
movb $0x0, 0x5c(%rdi)
callq 0x65b0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jakubsvehla[P]hex/src/window.cpp
// Function: Window::Window(int, int, int, int)
Window::Window (int lines, int cols, int y0, int x0)
{
  m_Win = newwin(lines, cols, y0, x0);
  m_Y0 = y0;
  m_X0 = x0;
  getmaxyx(m_Win, m_Height, m_Width);

  keypad(m_Win, TRUE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x7398(%rip), %rcx      # 0xbab0
addq $0x10, %rcx
movq %rcx, (%rax)
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0x32f0
movq -0x20(%rbp), %rcx
movq %rax, 0x18(%rcx)
movl -0x14(%rbp), %eax
movl %eax, 0x10(%rcx)
movl -0x18(%rbp), %eax
movl %eax, 0x14(%rcx)
xorl %eax, %eax
cmpq 0x18(%rcx), %rax
je 0x4760
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movswl 0x4(%rax), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x476a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x24(%rbp)
jmp 0x476a
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, 0x8(%rcx)
xorl %eax, %eax
cmpq 0x18(%rcx), %rax
je 0x4790
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movswl 0x6(%rax), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x479a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x28(%rbp)
jmp 0x479a
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, 0xc(%rax)
movq 0x18(%rax), %rdi
movl $0x1, %esi
callq 0x3140
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jakubsvehla[P]hex/src/window.cpp
// Function: Window::GetHex(int&) const
bool Window::GetHex (int & c) const
{
  stringstream buffer;
  int x;
  int i;

  for (i = 0; i < 2; i ++) {
    Get(x);
    if (x == ESC) return false;
    if (isxdigit(x)) {
      buffer << hex << (char) x;
    }
    else {
      throw NotHexadecimalValue();
    }    
  }

  buffer >> hex >> c;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x31f0
movl $0x0, -0x1a8(%rbp)
cmpl $0x2, -0x1a8(%rbp)
jge 0x4a6d
movq -0x1c0(%rbp), %rdi
leaq -0x1a4(%rbp), %rsi
callq 0x4920
jmp 0x49b6
cmpl $0x1b, -0x1a4(%rbp)
jne 0x49f5
movb $0x0, -0x1(%rbp)
movl $0x1, -0x1b8(%rbp)
jmp 0x4aa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x3210
jmp 0x4ac3
movl -0x1a4(%rbp), %edi
callq 0x30c0
cmpl $0x0, %eax
je 0x4a38
leaq -0x190(%rbp), %rdi
leaq 0x14d(%rip), %rsi       # 0x4b60
callq 0x3110
movq %rax, -0x1c8(%rbp)
jmp 0x4a21
movq -0x1c8(%rbp), %rdi
movsbl -0x1a4(%rbp), %esi
callq 0x33b0
jmp 0x4a36
jmp 0x4a57
movl $0x1, %edi
callq 0x3190
movq %rax, %rdi
leaq 0x7094(%rip), %rsi      # 0xbae0
xorl %eax, %eax
movl %eax, %edx
callq 0x3530
jmp 0x4acf
jmp 0x4a59
movl -0x1a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a8(%rbp)
jmp 0x4994
leaq 0xec(%rip), %rsi        # 0x4b60
leaq -0x1a0(%rbp), %rdi
callq 0x3510
movq %rax, -0x1d0(%rbp)
jmp 0x4a89
movq -0x1d0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x31b0
jmp 0x4a9b
movb $0x1, -0x1(%rbp)
movl $0x1, -0x1b8(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x3210
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x1b0(%rbp), %rdi
callq 0x3540
nop
// File: jakubsvehla[P]hex/src/file_view.cpp
// Function: FileView::FileView(int, int, int, int)
FileView::FileView (int lines, int cols, int y0, int x0)
: View (lines, cols, y0, x0)
{
  m_Offset = 0; // FIXME: rename offset to base

  m_File = NULL;
  m_FileVersion = 0;

  Configure();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movl -0x18(%rbp), %r8d
callq 0x4ca0
movq -0x30(%rbp), %rdi
leaq 0x6e0a(%rip), %rax      # 0xbba8
movq %rax, (%rdi)
leaq 0x6e30(%rip), %rax      # 0xbbd8
movq %rax, 0x20(%rdi)
movl $0x0, 0x30(%rdi)
movq $0x0, 0x50(%rdi)
movl $0x0, 0x58(%rdi)
xorl %eax, %eax
movl %eax, %esi
callq 0x4e00
jmp 0x4dcd
addq $0x30, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x4d10
movq -0x20(%rbp), %rdi
callq 0x3540
nopw %cs:(%rax,%rax)
// File: jakubsvehla[P]hex/src/file_view.cpp
// Function: FileView::Configure(Config*)
void FileView::Configure (Config * config)
{

  if (config != NULL) {
    m_ShowNums      = config -> m_Number;
    m_ShowASCII     = config -> m_ShowASCII;
    m_BlockSize     = config -> m_Group;
  }
  else {
    m_ShowNums      = true;
    m_ShowASCII     = true;
    m_BlockSize     = 4; // block size is 4 bytes by default    
  }

  if (m_ShowNums)
    m_HexOffset     = 10;
  else
    m_HexOffset     = 0;

  m_BlockCnt        = CalculateBlockCnt();

  m_BytesPerLine    = m_BlockSize * m_BlockCnt;
  m_BytesPerScreen  = m_BytesPerLine * m_Height;

  m_ASCIIOffset     = m_Width - m_BytesPerLine;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4e48
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, 0x3c(%rax)
movq -0x10(%rbp), %rcx
movb 0x1(%rcx), %cl
andb $0x1, %cl
movb %cl, 0x44(%rax)
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, 0x2c(%rax)
jmp 0x4e5b
movq -0x18(%rbp), %rax
movb $0x1, 0x3c(%rax)
movb $0x1, 0x44(%rax)
movl $0x4, 0x2c(%rax)
movq -0x18(%rbp), %rax
testb $0x1, 0x3c(%rax)
je 0x4e72
movq -0x18(%rbp), %rax
movl $0xa, 0x40(%rax)
jmp 0x4e7d
movq -0x18(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x18(%rbp), %rdi
callq 0x4f10
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
movl 0x2c(%rax), %ecx
imull 0x28(%rax), %ecx
movl %ecx, 0x38(%rax)
movl 0x38(%rax), %ecx
imull 0x8(%rax), %ecx
movl %ecx, 0x34(%rax)
movl 0xc(%rax), %ecx
subl 0x38(%rax), %ecx
movl %ecx, 0x48(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jakubsvehla[P]hex/src/file_view.cpp
// Function: FileView::CalculateBlockCnt() const
int FileView::CalculateBlockCnt () const
{
  int actual_block_size;
  int col_width;
  int tmp;
  int width;
  int block_cnt;

  block_cnt = 0;

  // Actual width of the block when it's rendered (with spaces).
  actual_block_size = (m_BlockSize * 3) + 1;

  width = m_Width - m_HexOffset;

  if (m_ShowASCII)
    col_width = actual_block_size + m_BlockSize;
  else
    col_width = actual_block_size;

  tmp = col_width;

  while (tmp <= width) {
    block_cnt ++;
    tmp += col_width;
  }

  return block_cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
imull $0x3, 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movl 0xc(%rax), %ecx
subl 0x40(%rax), %ecx
movl %ecx, -0x18(%rbp)
testb $0x1, 0x44(%rax)
je 0x4f4f
movq -0x28(%rbp), %rcx
movl -0xc(%rbp), %eax
addl 0x2c(%rcx), %eax
movl %eax, -0x10(%rbp)
jmp 0x4f55
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jg 0x4f77
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x4f5b
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: jakubsvehla[P]hex/src/file_view.cpp
// Function: FileView::Notify(Subject*)
void FileView::Notify (Subject * s)
{
  int pos;

  if (typeid(*s) == typeid(File)) {
    pos = m_File -> Tell();

    if (m_File -> Version() > m_FileVersion ||
        pos < m_Offset ||
        pos >= m_Offset + m_BytesPerScreen)
      Render();

    else
      MoveCursor(pos);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x4fab
callq 0x3350
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rdi
leaq 0x6adb(%rip), %rsi      # 0xba98
callq 0x54a0
testb $0x1, %al
jne 0x4fc8
jmp 0x5027
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x4290
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x14(%rbp)
movq 0x50(%rax), %rdi
callq 0x45b0
movq -0x28(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jg 0x500d
movq -0x28(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x30(%rcx), %eax
jl 0x500d
movq -0x28(%rbp), %rdx
movl -0x14(%rbp), %eax
movl 0x30(%rdx), %ecx
addl 0x34(%rdx), %ecx
cmpl %ecx, %eax
jl 0x5019
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x5025
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5030
jmp 0x5027
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)