// File: /workspace/github_c_makefile_star2_O0/otrtool[P]otrtool/src/main.c
// Function: dumpHex
void dumpHex(void *data_, int len) {
  unsigned char *data = data_;
  unsigned char *line = malloc(sizeof(char) * LINE_LENGTH + 1);
  char *hexrep_orig = bin2hex(data, len);
  char *hexrep = hexrep_orig;
  int i, pos;
  
  for (pos = 0 ; pos < len ; pos += 16) {
    for (i = 0 ; i < 8 ; i++) {
      line[i*3]   = pos+i < len ? hexrep[i*2] : ' ';
      line[i*3+1] = pos+i < len ? hexrep[i*2+1] : ' ';
      line[i*3+2] = ' ';
    }
    line[24] = ' ';
    for (i = 8 ; i < 16 ; i++) {
      line[i*3+1] = pos+i < len ? hexrep[i*2] : ' ';
      line[i*3+2] = pos+i < len ? hexrep[i*2+1] : ' ';
      line[i*3+3] = ' ';
    }
    line[49] = ' ';
    line[50] = '|';
    for (i = 0 ; i < 16 ; i++) {
      if (data[pos+i] >= 0x20 && data[pos+i] < 0x7f) {
        line[51+i] = pos+i < len ? data[pos+i] : ' ';
      } else {
        line[51+i] = pos+i < len ? '.' : ' ';
      }
    }
    line[67] = '|';
    
    line[68] = 0;
    fprintf(stderr, "%08x  %s\n", pos, line);
    hexrep += 32;
  }
  fprintf(stderr, "%08x\n", len);
  free(line);
  free(hexrep_orig);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x51, %edi
callq 0x2300
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x43a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x500f
movl $0x0, -0x34(%rbp)
cmpl $0x8, -0x34(%rbp)
jge 0x4e41
movl -0x38(%rbp), %eax
addl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x4dc1
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x3c(%rbp)
jmp 0x4dcb
movl $0x20, %eax
movl %eax, -0x3c(%rbp)
jmp 0x4dcb
movl -0x3c(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
imull $0x3, -0x34(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x38(%rbp), %eax
addl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x4e01
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x40(%rbp)
jmp 0x4e0b
movl $0x20, %eax
movl %eax, -0x40(%rbp)
jmp 0x4e0b
movl -0x40(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
imull $0x3, -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
imull $0x3, -0x34(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb $0x20, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x4d97
movq -0x20(%rbp), %rax
movb $0x20, 0x18(%rax)
movl $0x8, -0x34(%rbp)
cmpl $0x10, -0x34(%rbp)
jge 0x4efd
movl -0x38(%rbp), %eax
addl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x4e7a
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
jmp 0x4e84
movl $0x20, %eax
movl %eax, -0x44(%rbp)
jmp 0x4e84
movl -0x44(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
imull $0x3, -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x38(%rbp), %eax
addl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x4ebd
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x48(%rbp)
jmp 0x4ec7
movl $0x20, %eax
movl %eax, -0x48(%rbp)
jmp 0x4ec7
movl -0x48(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
imull $0x3, -0x34(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
imull $0x3, -0x34(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movb $0x20, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x4e50
movq -0x20(%rbp), %rax
movb $0x20, 0x31(%rax)
movq -0x20(%rbp), %rax
movb $0x7c, 0x32(%rax)
movl $0x0, -0x34(%rbp)
cmpl $0x10, -0x34(%rbp)
jge 0x4fc6
movq -0x18(%rbp), %rax
movl -0x38(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jl 0x4f8c
movq -0x18(%rbp), %rax
movl -0x38(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7f, %eax
jge 0x4f8c
movl -0x38(%rbp), %eax
addl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x4f6b
movq -0x18(%rbp), %rax
movl -0x38(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
jmp 0x4f75
movl $0x20, %eax
movl %eax, -0x4c(%rbp)
jmp 0x4f75
movl -0x4c(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x33, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4fb6
movl -0x38(%rbp), %edx
addl -0x34(%rbp), %edx
movl -0xc(%rbp), %esi
movl $0x20, %eax
movl $0x2e, %ecx
cmpl %esi, %edx
cmovll %ecx, %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
addl $0x33, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4fb8
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x4f14
movq -0x20(%rbp), %rax
movb $0x7c, 0x43(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x44(%rax)
movq 0x7ffb(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
movl -0x38(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq 0x5301(%rip), %rsi      # 0xa2ef
movb $0x0, %al
callq 0x2330
movq -0x30(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x30(%rbp)
movl -0x38(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x38(%rbp)
jmp 0x4d84
movq 0x7fc2(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x52d6(%rip), %rsi      # 0xa2f9
movb $0x0, %al
callq 0x2330
movq -0x20(%rbp), %rdi
callq 0x2280
movq -0x28(%rbp), %rdi
callq 0x2280
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)