LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: hex2bin
void * hex2bin(char *data_) {
  int len = strlen(data_) / 2;
  unsigned char *data = (unsigned char*)data_;
  // never tested with lowercase letters!
  unsigned char *result = malloc(sizeof(char) * len + 1);
  int foo, bar;
  result[len] = 0;
  for (len-- ; len >= 0 ; len--) {
    foo = data[len*2];
    if (foo < 0x41) {
      // is a digit
      bar = foo - 0x30;
    } else if (foo < 0x61) {
      // is a uppercase letter
      bar = foo - 0x37;
    } else {
      // is a lowercase letter
      bar = foo - 0x57;
    }
    result[len] = bar << 4;
    
    foo = data[len*2 + 1];
    if (foo < 0x41) {
      // is a digit
      bar = foo - 0x30;
    } else if (foo < 0x61) {
      // is a uppercase letter
      bar = foo - 0x37;
    } else {
      // is a lowercase letter
      bar = foo - 0x57;
    }
    result[len] += bar;
  }
  return (void*)result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x20c0
movq %rax, %r14
shrq %r14
movslq %r14d, %r15
leaq 0x1(%r15), %rdi
callq 0x2300
movb $0x0, (%rax,%r15)
testl %r15d, %r15d
jle 0x4b17
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
incq %r14
movl $0xd0, %ecx
movb -0x4(%rbx,%r14,2), %dl
xorl %esi, %esi
cmpb $0x41, %dl
setae %sil
leal (%rsi,%rsi,8), %esi
addb %dl, %sil
shlb $0x4, %sil
movb %sil, -0x2(%rax,%r14)
movb -0x3(%rbx,%r14,2), %dl
cmpb $0x61, %dl
setb %dil
shlb $0x5, %dil
addb $-0x57, %dil
cmpb $0x41, %dl
movzbl %dil, %edi
cmovbl %ecx, %edi
addb %dl, %sil
addb %dil, %sil
movb %sil, -0x2(%rax,%r14)
decq %r14
cmpq $0x1, %r14
jg 0x4ac8
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: base64Encode
char * base64Encode(void *data_, int len) {
  unsigned char *data = data_;
  static const char *b64 = "\
ABCDEFGHIJKLMNOPQRSTUVWXYZ\
abcdefghijklmnopqrstuvwxyz\
0123456789+/";
  int blocks = (len + 2) / 3;
  int newlen = blocks * 4 + 1;
  char *result = malloc(newlen);
  char *resptr = result;
  int i;
  
  for (i = len / 3 ; i > 0 ; i--) {
    resptr[0] = b64[  data[0]             >> 2 ];
    resptr[1] = b64[ (data[0] &     B_11) << 4
                    | data[1]             >> 4 ];
    resptr[2] = b64[ (data[1] &   B_1111) << 2
                    | data[2]             >> 6 ];
    resptr[3] = b64[  data[2] & B_111111       ];
    resptr += 4;
    data += 3;
  }
  
  if (len < blocks * 3 - 1) {
    resptr[0] = b64[  data[0]             >> 2 ];
    resptr[1] = b64[ (data[0] &     B_11) << 4 ];
    resptr[2] = '=';
    resptr[3] = '=';
    resptr += 4;
  } else if (len < blocks * 3) {
    resptr[0] = b64[  data[0]             >> 2 ];
    resptr[1] = b64[ (data[0] &     B_11) << 4
                    | data[1]             >> 4 ];
    resptr[2] = b64[ (data[1] &   B_1111) << 2 ];
    resptr[3] = '=';
    resptr += 4;
  }
  
  *resptr = 0;
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal 0x2(%r14), %eax
cltq
imulq $0x55555556, %rax, %r15 # imm = 0x55555556
movq %r15, %rax
shrq $0x3f, %rax
shrq $0x20, %r15
addl %eax, %r15d
leal 0x1(,%r15,4), %eax
movslq %eax, %rdi
callq 0x2300
cmpl $0x3, %r14d
jl 0x4bde
movl %r14d, %ecx
movl $0xaaaaaaab, %edx       # imm = 0xAAAAAAAB
imulq %rcx, %rdx
shrq $0x21, %rdx
incl %edx
leaq 0x3686(%rip), %rsi      # 0x81fc
movq %rax, %rcx
movzbl (%rbx), %edi
movl %edi, %r8d
shrl $0x2, %r8d
movb (%r8,%rsi), %r8b
movb %r8b, (%rcx)
shll $0x4, %edi
andl $0x30, %edi
movzbl 0x1(%rbx), %r8d
movl %r8d, %r9d
shrl $0x4, %r9d
orl %edi, %r9d
movb (%r9,%rsi), %dil
movb %dil, 0x1(%rcx)
andl $0xf, %r8d
movzbl 0x2(%rbx), %edi
movl %edi, %r9d
shrl $0x6, %r9d
leal (%r9,%r8,4), %r8d
movb (%r8,%rsi), %r8b
movb %r8b, 0x2(%rcx)
andl $0x3f, %edi
movb (%rdi,%rsi), %dil
movb %dil, 0x3(%rcx)
addq $0x4, %rcx
addq $0x3, %rbx
decl %edx
cmpl $0x1, %edx
jg 0x4b79
jmp 0x4be1
movq %rax, %rcx
leal (%r15,%r15,2), %edx
decl %edx
cmpl %r14d, %edx
jle 0x4c12
movzbl (%rbx), %edx
movl %edx, %esi
shrl $0x2, %esi
leaq 0x3601(%rip), %rdi      # 0x81fc
movb (%rsi,%rdi), %sil
movb %sil, (%rcx)
shll $0x4, %edx
andl $0x30, %edx
movb (%rdx,%rdi), %dl
movb %dl, 0x1(%rcx)
movb $0x3d, %dl
jmp 0x4c52
leal (%r15,%r15,2), %edx
cmpl %r14d, %edx
jle 0x4c5d
movzbl (%rbx), %edx
movl %edx, %esi
shrl $0x2, %esi
leaq 0x35d2(%rip), %rdi      # 0x81fc
movb (%rsi,%rdi), %sil
movb %sil, (%rcx)
shll $0x4, %edx
andl $0x30, %edx
movzbl 0x1(%rbx), %esi
movl %esi, %r8d
shrl $0x4, %r8d
orl %edx, %r8d
movb (%r8,%rdi), %dl
movb %dl, 0x1(%rcx)
andl $0xf, %esi
movb (%rdi,%rsi,4), %dl
movb %dl, 0x2(%rcx)
movb $0x3d, 0x3(%rcx)
addq $0x4, %rcx
movb $0x0, (%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: base64Decode
void * base64Decode(char *text, int *outlen) {
  static const unsigned char b64dec[] = {
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //00
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //10
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0, 62,  0,  0,  0, 63, //20
  52, 53, 54, 55, 56, 57, 58, 59,  60, 61,  0,  0,  0,  0,  0,  0, //30
   0,  0,  1,  2,  3,  4,  5,  6,   7,  8,  9, 10, 11, 12, 13, 14, //40
  15, 16, 17, 18, 19, 20, 21, 22,  23, 24, 25,  0,  0,  0,  0,  0, //50
   0, 26, 27, 28, 29, 30, 31, 32,  33, 34, 35, 36, 37, 38, 39, 40, //60
  41, 42, 43, 44, 45, 46, 47, 48,  49, 50, 51,  0,  0,  0,  0,  0, //70
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //80
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //90
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //a0
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //b0
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //c0
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //d0
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0, //e0
   0,  0,  0,  0,  0,  0,  0,  0,   0,  0,  0,  0,  0,  0,  0,  0  //f0
  };
  // this functions treats invalid characters as 'A'. deal with it :-P
  int inlen = (strlen(text) >> 2) << 2;
  int blocks = inlen >> 2;
  *outlen = blocks * 3 - (text[inlen-2] == '='
      ? 2 : (text[inlen-1] == '=' ? 1 : 0));
  char *result = malloc(blocks * 3);
  char *resptr = result;
  uint8_t *text_ = (uint8_t*)text;
  int i;
  
  for (i = 0 ; i < blocks ; i++) {
    resptr[0] = b64dec[text_[0]] << 2 | b64dec[text_[1]] >> 4;
    resptr[1] = b64dec[text_[1]] << 4 | b64dec[text_[2]] >> 2;
    resptr[2] = b64dec[text_[2]] << 6 | b64dec[text_[3]];
    
    text_ += 4;
    resptr += 3;
  }
  
  return (void*)result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x20c0
movq %rax, %r14
movslq %r14d, %rdx
sarl $0x2, %r14d
leal (%r14,%r14,2), %eax
andq $-0x4, %rdx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpb $0x3d, -0x2(%rbx,%rdx)
je 0x4ca0
xorl %ecx, %ecx
cmpb $0x3d, -0x1(%rbx,%rdx)
sete %cl
negl %ecx
addl %eax, %ecx
movl %ecx, (%r15)
movslq %eax, %rdi
callq 0x2300
testl %r14d, %r14d
jle 0x4d1e
movl %r14d, %ecx
xorl %edx, %edx
leaq 0x3422(%rip), %rsi      # 0x80e0
movq %rax, %rdi
movzbl (%rbx,%rdx,4), %r8d
movb (%r8,%rsi), %r8b
shlb $0x2, %r8b
movzbl 0x1(%rbx,%rdx,4), %r9d
movb (%r9,%rsi), %r9b
movl %r9d, %r10d
shrb $0x4, %r10b
orb %r8b, %r10b
movb %r10b, (%rdi)
shlb $0x4, %r9b
movzbl 0x2(%rbx,%rdx,4), %r8d
movb (%r8,%rsi), %r8b
movl %r8d, %r10d
shrb $0x2, %r10b
orb %r9b, %r10b
movb %r10b, 0x1(%rdi)
shlb $0x6, %r8b
movzbl 0x3(%rbx,%rdx,4), %r9d
orb (%r9,%rsi), %r8b
movb %r8b, 0x2(%rdi)
incq %rdx
addq $0x3, %rdi
cmpl %edx, %ecx
jne 0x4cc1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: queryGetParam
char * queryGetParam(char *query, char *name) {
  char *begin = strchr(query, '&');
  char *end;
  int nameLen = strlen(name);
  
  while (begin != NULL) {
    begin++;
    if (strncmp(begin, name, nameLen) == 0 && begin[nameLen] == '=') {
      begin += nameLen + 1;
      end = strchr(begin, '&');
      if (end == NULL)
        end = begin + strlen(begin);
      char *result = malloc(end - begin + 1);
      strncpy(result, begin, end - begin);
      result[end - begin] = 0;
      return result;
    }
    begin = strchr(begin, '&');
  }
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movl $0x26, %esi
callq 0x2090
testq %rax, %rax
je 0x4dba
movq %rax, %rbx
movq %r14, %rdi
callq 0x20c0
movslq %eax, %r12
movq %rax, %r13
shlq $0x20, %r13
xorl %r15d, %r15d
incq %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x20e0
testl %eax, %eax
jne 0x4da3
cmpb $0x3d, (%rbx,%r12)
je 0x4dbf
movq %rbx, %rdi
movl $0x26, %esi
callq 0x2090
movq %rax, %rbx
testq %rax, %rax
jne 0x4d87
jmp 0x4e18
xorl %r15d, %r15d
jmp 0x4e18
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r13
sarq $0x20, %r13
addq %r13, %rbx
movq %rbx, %rdi
movl $0x26, %esi
callq 0x2090
movq %rax, %r14
testq %rax, %rax
jne 0x4df6
movq %rbx, %rdi
callq 0x20c0
movq %rax, %r14
addq %rbx, %r14
subq %rbx, %r14
leaq 0x1(%r14), %rdi
callq 0x2300
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x20f0
movb $0x0, (%r15,%r14)
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: quote
void quote(char *message) {
  char line[LINE_LENGTH + 1];
  line[0] = '>';
  line[1] = ' ';
  int index = 2;
  
  while (*message != 0) {
    if (*message < 0x20 || *message > 0x7E) {
      line[index++] = ' ';
    } else {
      line[index++] = *message;
    }
    if (index == LINE_LENGTH) {
      line[index++] = '\n';
      fwrite(line, index, 1, stderr);
      line[0] = '>';
      line[1] = ' ';
      index = 2;
    }
    message++;
  }
  line[index++] = '\n';
  if (index != 3) fwrite(line, index, 1, stderr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movw $0x203e, (%rsp)         # imm = 0x203E
movb (%rdi), %al
testb %al, %al
je 0x4e93
movq %rdi, %rbx
leaq 0x1(%rsp), %r14
leaq 0x50(%rsp), %r15
incq %rbx
movl $0x2, %edi
movl $0x20, %ebp
movq %rsp, %r12
leal -0x7f(%rax), %ecx
cmpb $-0x5f, %cl
movzbl %al, %eax
cmovbl %ebp, %eax
movslq %edi, %rdi
movb %al, (%rsp,%rdi)
incl %edi
cmpl $0x50, %edi
je 0x4e7e
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x4e5a
jmp 0x4e98
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x28a7
movl $0x2, %edi
jmp 0x4e73
movl $0x2, %edi
movslq %edi, %rax
incl %edi
movb $0xa, (%rsp,%rax)
cmpl $0x3, %edi
jne 0x4eb3
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rsi
callq 0x28db
jmp 0x4ea6
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: dumpQuerystring
void dumpQuerystring(char *query) {
  char line[LINE_LENGTH + 1];
  int index = 0;

  if (*query == '&') {
    line[0] = '&';
    index++;
    query++;
  }

  for (; *query; query++) {
    if (*query == '&') {
      line[index] = '\n';
      fwrite(line, index + 1, 1, stderr);
      index = 0;
    }
    line[index] = *query;

    index++;
    if (index == LINE_LENGTH) {
      line[index] = '\n';
      fwrite(line, index + 1, 1, stderr);
      line[0] = ' ';
      index = 1;
    }
  }
  line[index] = '\n';
  if (index != LINE_LENGTH) fwrite(line, index + 1, 1, stderr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
xorl %edi, %edi
cmpb $0x26, (%rbx)
jne 0x4edc
movb $0x26, (%rsp)
incq %rbx
movl $0x1, %edi
leaq 0x50(%rsp), %r14
movq %rsp, %r15
movzbl (%rbx), %eax
cmpl $0x26, %eax
je 0x4f04
testl %eax, %eax
je 0x4f22
movb (%rbx), %al
movslq %edi, %rdi
movb %al, (%rsp,%rdi)
incl %edi
cmpl $0x50, %edi
je 0x4f10
incq %rbx
jmp 0x4ee4
movq %r15, %rsi
callq 0x28fc
xorl %edi, %edi
jmp 0x4ef0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2949
movl $0x1, %edi
jmp 0x4eff
movslq %edi, %rax
movb $0xa, (%rsp,%rax)
cmpl $0x50, %edi
jne 0x4f38
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rsp, %rsi
callq 0x2926
jmp 0x4f2e
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: showProgress
void showProgress(long long position, long long length) {
  static long long oldpos = 0;
  static unsigned int blocknum = 0;
  const char progressbar[41] = "========================================";
  const char *rotatingFoo = "|/-\\";

  if (logfilemode)
    return;
  if (length > 0) {
    if (oldpos > position) {
      oldpos = 0;
      blocknum = 0;
    }
    if (position - oldpos >= 2097152 || position == 0) {
      if (opts.guimode == 0) {
        fprintf(stderr, "[%-40.*s] %3i%% %c\r", (int)(position*40/length),
            progressbar, (int)(position*100/length),
            rotatingFoo[blocknum++ % 4]);
      } else {
        fprintf(stdout, "gui> %7.3f\n", position*100.0/length);
        fflush(stdout);
      }
      fflush(stderr);
      oldpos = position;
    }
  } else {
    if (opts.guimode == 0) {
      fputs("[========================================] 100%    \n", stderr);
    } else {
      fputs("gui> Finished\n", stdout);
      fflush(stdout);
    }
    oldpos = 0;
    blocknum = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movups 0x4069(%rip), %xmm0     # 0x8fb9
movups %xmm0, 0x19(%rsp)
movaps 0x4054(%rip), %xmm0     # 0x8fb0
movaps %xmm0, 0x10(%rsp)
movapd 0x4037(%rip), %xmm0     # 0x8fa0
movapd %xmm0, (%rsp)
cmpb $0x0, 0x7307(%rip)      # 0xc27c
jne 0x505a
testq %rsi, %rsi
jle 0x501e
movq %rdi, %rbx
cmpq %rdi, 0x72e2(%rip)      # 0xc270
jle 0x4fa5
movq $0x0, 0x72d5(%rip) # 0xc270
movl $0x0, 0x72d3(%rip)      # 0xc278
testq %rbx, %rbx
je 0x4fc0
movq %rbx, %rax
subq 0x72bc(%rip), %rax      # 0xc270
cmpq $0x200000, %rax         # imm = 0x200000
jl 0x505a
cmpb $0x0, 0x72c9(%rip)      # 0xc290
je 0x5069
movq 0x6fdc(%rip), %r14      # 0xbfb0
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
mulsd 0x3084(%rip), %xmm0     # 0x8068
movq (%r14), %rdi
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
leaq 0x32b1(%rip), %rsi      # 0x82a8
movb $0x1, %al
callq 0x2330
movq (%r14), %rdi
callq 0x2260
movq 0x6fcb(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x2260
movq %rbx, 0x7254(%rip)      # 0xc270
jmp 0x505a
cmpb $0x0, 0x726b(%rip)      # 0xc290
je 0x5062
movq 0x6f82(%rip), %rbx      # 0xbfb0
movq (%rbx), %rsi
leaq 0x32b1(%rip), %rdi      # 0x82e9
callq 0x2240
movq (%rbx), %rdi
callq 0x2260
movq $0x0, 0x7220(%rip) # 0xc270
movl $0x0, 0x721e(%rip)      # 0xc278
addq $0x38, %rsp
popq %rbx
popq %r14
retq
callq 0x296d
jmp 0x5045
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x2983
jmp 0x5006
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: createThread
thread_t createThread(void *(*start_routine)(void *), void *arg) {
  pthread_t tid;
  errno = pthread_create(&tid, NULL, start_routine, arg);
  if (errno != 0) PERROR("pthread_create");
  return tid;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rcx
movq %rdi, %rdx
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x2430
movl %eax, %ebx
callq 0x2030
movl %ebx, (%rax)
testl %ebx, %ebx
jne 0x50a5
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
callq 0x29dd
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: joinThread
void *joinThread(thread_t tid) {
  void *res;
  errno = pthread_join(tid, &res);
  if (errno != 0) PERROR("pthread_join");
  return res;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rsi
callq 0x21a0
movl %eax, %ebx
callq 0x2030
movl %ebx, (%rax)
testl %ebx, %ebx
jne 0x50d1
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
callq 0x2a2f
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: getHeader
char * getHeader() {
  unsigned char *header = malloc(sizeof(char) * 513);
  if (fread(header, 512, 1, file) < 1 && !feof(file))
    PERROR("Error reading file");
  if (feof(file))
    ERROR("Error: unexpected end of file");
  unsigned char hardKey[] = {
      0xEF, 0x3A, 0xB2, 0x9C, 0xD1, 0x9F, 0x0C, 0xAC,
      0x57, 0x59, 0xC7, 0xAB, 0xD1, 0x2C, 0xC9, 0x2B,
      0xA3, 0xFE, 0x0A, 0xFE, 0xBF, 0x96, 0x0D, 0x63,
      0xFE, 0xBD, 0x0F, 0x45};
  bf_state_t blowfish;
  bf_init(&blowfish, hardKey, 28);
  bf_ecb_decrypt(&blowfish, header, 512);
  header[512] = 0;
  
  char *padding = strstr((char*)header, "&PD=");
  if (padding == NULL)
    ERROR("Corrupted header: could not find padding");
  *padding = 0;
  
  if (opts.verbosity >= VERB_DEBUG) {
    fputs("\nDumping decrypted header:\n", stderr);
    dumpQuerystring((char*)header);
    fputs("\n", stderr);
  }
  return (char*)header;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1068, %rsp           # imm = 0x1068
movl $0x201, %edi            # imm = 0x201
callq 0x2300
movq %rax, %rbx
movq 0x7176(%rip), %rcx      # 0xc2d0
movl $0x200, %esi            # imm = 0x200
movl $0x1, %edx
movq %rax, %rdi
callq 0x2360
testq %rax, %rax
jne 0x5185
movq 0x7158(%rip), %rdi      # 0xc2d0
callq 0x2370
testl %eax, %eax
je 0x5218
movq 0x7144(%rip), %rdi      # 0xc2d0
callq 0x2370
testl %eax, %eax
jne 0x520e
movups 0x3050(%rip), %xmm0     # 0x81ec
movq %rsp, %rsi
movups %xmm0, 0xc(%rsi)
movaps 0x3036(%rip), %xmm0     # 0x81e0
movaps %xmm0, (%rsi)
leaq 0x20(%rsp), %r14
movl $0x1c, %edx
movq %r14, %rdi
callq 0x44e4
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
movq %rbx, %rsi
callq 0x46a7
movb $0x0, 0x200(%rbx)
leaq 0x318f(%rip), %rsi      # 0x836c
movq %rbx, %rdi
callq 0x2060
testq %rax, %rax
je 0x5213
movb $0x0, (%rax)
cmpb $0x1, 0x7094(%rip)      # 0xc288
je 0x5204
movq %rbx, %rax
addq $0x1068, %rsp           # imm = 0x1068
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2c08
jmp 0x51f6
callq 0x2bc9
callq 0x2c44
callq 0x2c83
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: generateBigkey
void * generateBigkey(char *date) {
  char *mailhash = bin2hex(MD5(
      (unsigned char*)email, strlen(email), NULL), 16);
  char *passhash = bin2hex(MD5(
      (unsigned char*)password, strlen(password), NULL), 16);
  char *bigkey_hex = malloc(57 * sizeof(char));
  char *ptr = bigkey_hex;
  
  strncpy(ptr, mailhash, 13);
  ptr += 13;
  
  strncpy(ptr, date, 4);
  date += 4;
  ptr += 4;
  
  strncpy(ptr, passhash, 11);
  ptr += 11;
  
  strncpy(ptr, date, 2);
  date += 2;
  ptr += 2;
  
  strncpy(ptr, mailhash + 21, 11);
  ptr += 11;
  
  strncpy(ptr, date, 2);
  ptr += 2;
  
  strncpy(ptr, passhash + 19, 13);
  ptr += 13;
  
  *ptr = 0;
  
  if (opts.verbosity >= VERB_DEBUG) {
    fprintf(stderr, "\nGenerated BigKey: %s\n\n", bigkey_hex);
  }
  
  void *res = hex2bin(bigkey_hex);
  
  free(bigkey_hex);
  free(mailhash);
  free(passhash);
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
movq 0x70a8(%rip), %rbx      # 0xc2d8
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x446d
movq %rax, %rdi
movl $0x10, %esi
callq 0x4a14
movq %rax, %rbx
movq 0x7084(%rip), %r14      # 0xc2e0
movq %r14, %rdi
callq 0x20c0
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x446d
movq %rax, %rdi
movl $0x10, %esi
callq 0x4a14
movq %rax, %r14
movl $0x39, %edi
callq 0x2300
movq %rax, %r12
movl $0xd, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x20f0
leaq 0xd(%r12), %rdi
movl $0x4, %edx
movq %r15, %rsi
callq 0x20f0
leaq 0x4(%r15), %r13
leaq 0x11(%r12), %rdi
movl $0xb, %edx
movq %r14, %rsi
callq 0x20f0
leaq 0x1c(%r12), %rdi
movl $0x2, %edx
movq %r13, %rsi
callq 0x20f0
addq $0x6, %r15
leaq 0x1e(%r12), %rdi
movq %rbx, %rsi
addq $0x15, %rsi
movl $0xb, %edx
callq 0x20f0
leaq 0x29(%r12), %rdi
movl $0x2, %edx
movq %r15, %rsi
callq 0x20f0
leaq 0x2b(%r12), %rdi
movq %r14, %rsi
addq $0x13, %rsi
movl $0xd, %edx
callq 0x20f0
movb $0x0, 0x38(%r12)
cmpb $0x1, 0x6f61(%rip)      # 0xc288
je 0x5359
movq %r12, %rdi
callq 0x4a90
movq %rax, %r15
movq %r12, %rdi
callq 0x2280
movq %rbx, %rdi
callq 0x2280
movq %r14, %rdi
callq 0x2280
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x6c78(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
leaq 0x304c(%rip), %rsi      # 0x83b6
movq %r12, %rdx
xorl %eax, %eax
callq 0x2330
jmp 0x5329
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: WriteMemoryCallback
static size_t WriteMemoryCallback(void *ptr, size_t size,
          size_t nmemb, void *data) {
  size_t realsize = size * nmemb;
  struct MemoryStruct *mem = (struct MemoryStruct *)data;
  char *newmem;
  
  // abort very long transfers
  if (mem->size + realsize > MAX_RESPONSE_LENGTH) {
    realsize = mem->size <= MAX_RESPONSE_LENGTH
        ? MAX_RESPONSE_LENGTH - mem->size
        : 0;
  }
  if (realsize < 1) return 0;
  
  // "If realloc() fails the original block is left untouched" (man 3 realloc)
  newmem = realloc(mem->memory, mem->size + realsize);
  if (newmem != NULL) {
    mem->memory = newmem;
    memcpy(&(mem->memory[mem->size]), ptr, realsize);
    mem->size += realsize;
  } else return 0;
  return realsize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %rcx
movq %rdi, %r15
imulq %rdx, %rcx
movq 0x8(%rbx), %rsi
leaq (%rsi,%rcx), %rdx
movl $0x3e8, %r14d           # imm = 0x3E8
subq %rsi, %r14
xorl %eax, %eax
movl $0x3e9, %edi            # imm = 0x3E9
cmpq %rdi, %rsi
cmovaeq %rax, %r14
cmpq %rdi, %rdx
cmovbq %rcx, %r14
testq %r14, %r14
je 0x56e1
movq (%rbx), %rdi
addq %r14, %rsi
callq 0x23d0
testq %rax, %rax
je 0x56df
movq %rax, (%rbx)
movq 0x8(%rbx), %r12
addq %r12, %rax
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2160
addq %r14, %r12
movq %r12, 0x8(%rbx)
movq %r14, %rax
jmp 0x56e1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: decryptResponse
char * decryptResponse(char *response, int length, void *bigkey) {
  bf_state_t blowfish;
  
  if (length < BF_IV_LEN)
    return NULL;
  length -= BF_IV_LEN;
  
  char *result = malloc(length);
  memcpy(result, response+BF_IV_LEN, length);
  
  bf_init(&blowfish, bigkey, 28);
  bf_cbc_decrypt(&blowfish, result, length, response);
  
  char *padding = strstr(result, "&D=");
  if (padding == NULL)
    ERROR("Corrupted response: could not find padding");
  *padding = 0;
  
  if (opts.verbosity >= VERB_DEBUG) {
    fputs("\nDecrypted response:\n", stderr);
    dumpQuerystring(result);
    fputs("\n", stderr);
  }
  
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1050, %rsp           # imm = 0x1050
cmpl $0x8, %esi
jge 0x5706
xorl %ebx, %ebx
jmp 0x5773
movq %rdx, %r12
movl %esi, %r15d
movq %rdi, %r14
addl $-0x8, %r15d
movq %r15, %rdi
callq 0x2300
movq %rax, %rbx
leaq 0x8(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2160
leaq 0x8(%rsp), %r13
movl $0x1c, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x44e4
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x486f
leaq 0x2dd4(%rip), %rsi      # 0x852e
movq %rbx, %rdi
callq 0x2060
testq %rax, %rax
je 0x5791
movb $0x0, (%rax)
cmpb $0x1, 0x6b17(%rip)      # 0xc288
je 0x5787
movq %rbx, %rax
addq $0x1050, %rsp           # imm = 0x1050
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x2e01
jmp 0x5773
callq 0x2e3d
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: keycache_get
char *keycache_get(const char *fh) {
  char *cachephrase, *cachefh;
  static char line[512];
  
  if (fh == NULL || keyfile == NULL) return NULL;
  rewind(keyfile);
  while (fgets(line, sizeof(line), keyfile) != NULL) {
    cachefh = strtok(line, " \t\r\n");
    cachephrase = strtok(NULL, " \t\r\n");
    if (cachephrase == NULL || cachefh == NULL) continue;
    if (strcmp(cachefh, fh) == 0) return cachephrase;
  }
  if (!feof(keyfile)) PERROR("fgets");
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
sete %al
movq 0x688d(%rip), %rdi      # 0xc300
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x5b17
callq 0x2050
movq 0x6873(%rip), %rdx      # 0xc300
leaq 0x687c(%rip), %rdi      # 0xc310
movl $0x200, %esi            # imm = 0x200
callq 0x23b0
testq %rax, %rax
je 0x5b07
leaq 0x6866(%rip), %r14      # 0xc310
leaq 0x2b72(%rip), %r15      # 0x8623
movq %r14, %rdi
movq %r15, %rsi
callq 0x2390
movq %rax, %r13
xorl %edi, %edi
movq %r15, %rsi
callq 0x2390
movq %rax, %r12
testq %rax, %rax
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
cmpb $0x1, %cl
je 0x5aee
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2320
testl %eax, %eax
je 0x5b1a
movq 0x680b(%rip), %rdx      # 0xc300
movq %r14, %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x23b0
testq %rax, %rax
jne 0x5ab1
movq 0x67f2(%rip), %rdi      # 0xc300
callq 0x2370
testl %eax, %eax
je 0x5b27
xorl %r12d, %r12d
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x2f6a
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: keycache_put
void keycache_put(const char *fh, const char *keyphrase) {
  char *cachephrase, *fn;
  
  if (fh == NULL || keyfile == NULL) return;
  if ((cachephrase = keycache_get(fh)) != NULL) {
    if (strcmp(keyphrase, cachephrase) != 0)
      fputs("warning: differing keyphrase was found in cache file!\n", stderr);
    else
      fputs("info: keyphrase was already in cache\n", stderr);
    return;
  }
  fn = queryGetParam(header, "FN");
  if (fprintf(keyfile, "%s\t%s\t# %s\n", fh, keyphrase, fn) < 0)
    PERROR("fprintf");
  fflush(keyfile);
  fprintf(stderr, "info: saved keyphrase to %s\n", keyfileshortname);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5b3f
cmpq $0x0, 0x67c3(%rip)      # 0xc300
jne 0x5b47
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5a5a
testq %rax, %rax
jne 0x5b93
movq 0x678a(%rip), %rdi      # 0xc2e8
leaq 0x2869(%rip), %rsi      # 0x83ce
callq 0x4d54
movq 0x678f(%rip), %rdi      # 0xc300
leaq 0x2b13(%rip), %rsi      # 0x868b
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x2330
testl %eax, %eax
js 0x5bc8
callq 0x2fbc
jmp 0x5b3f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2320
movq 0x6433(%rip), %rcx      # 0xbfd8
movq (%rcx), %rsi
testl %eax, %eax
jne 0x5bb5
leaq 0x2ab2(%rip), %rdi      # 0x8665
jmp 0x5bbc
leaq 0x2a72(%rip), %rdi      # 0x862e
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
callq 0x2fe9
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: openFile
void openFile() {
  if (strcmp("-", filename) == 0)
    file = stdin;
  else
    file = fopen(filename, "rb");
  
  if (file == NULL)
    PERROR("Error opening file");
  
  char magic[11] = { 0 };
  if (fread(magic, 10, 1, file) < 1 && !feof(file))
    PERROR("Error reading file");
  if (feof(file))
    ERROR("Error: unexpected end of file");
  if (strcmp(magic, "OTRKEYFILE") != 0)
    ERROR("Wrong file format");
  
  header = getHeader();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x66ba(%rip), %rbx      # 0xc530
leaq 0x2a24(%rip), %rdi      # 0x88a1
movq %rbx, %rsi
callq 0x2320
testl %eax, %eax
je 0x5e9d
leaq 0x2a13(%rip), %rsi      # 0x88a3
movq %rbx, %rdi
callq 0x2270
movq %rax, %rcx
jmp 0x5ea7
movq 0x612c(%rip), %rax      # 0xbfd0
movq (%rax), %rcx
movq %rcx, 0x6422(%rip)      # 0xc2d0
testq %rcx, %rcx
je 0x5f2c
movq %rsp, %rdi
movl $0x0, 0x7(%rdi)
movq $0x0, (%rdi)
movl $0xa, %esi
movl $0x1, %edx
callq 0x2360
testq %rax, %rax
jne 0x5ee8
movq 0x63f1(%rip), %rdi      # 0xc2d0
callq 0x2370
testl %eax, %eax
je 0x5f3b
movq 0x63e1(%rip), %rdi      # 0xc2d0
callq 0x2370
testl %eax, %eax
jne 0x5f31
movabsq $0x494659454b52544f, %rax # imm = 0x494659454B52544F
xorq (%rsp), %rax
movabsq $0x454c494659454b, %rcx # imm = 0x454C494659454B
xorq 0x3(%rsp), %rcx
orq %rax, %rcx
jne 0x5f36
callq 0x513c
movq %rax, 0x63c2(%rip)      # 0xc2e8
addq $0x10, %rsp
popq %rbx
retq
callq 0x34f2
callq 0x3422
callq 0x3461
callq 0x34a0
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: verifyFile_init
void verifyFile_init(vfy_t *vfy, int input) {
  char *hash_hex, *hash;
  int i;
  
  memset(vfy, 0, sizeof(*vfy));
  vfy->input = input;
  
  /* get MD5 sum from 'OH' or 'FH' header field */
  hash_hex = queryGetParam(header, vfy->input?"OH":"FH");
  if (hash_hex == NULL || strlen(hash_hex) != 48)
    ERROR("Missing hash in file header / unexpected format");
  for (i=1; i<16; ++i) {
    hash_hex[2*i] = hash_hex[3*i];
    hash_hex[2*i+1] = hash_hex[3*i+1];
  }
  hash_hex[32] = 0;
  if (opts.verbosity >= VERB_DEBUG)
    fprintf(stderr, "Checking %s against MD5 sum: %s\n",
      vfy->input?"input":"output", hash_hex);
  hash = hex2bin(hash_hex);
  memcpy(vfy->hash1, hash, 16);
  
  /* calculate MD5 sum of file (without header) */
  memset(&vfy->ctx, 0, sizeof(vfy->ctx));
  MD5_Init(&vfy->ctx);
  
  free(hash_hex);
  free(hash);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0xac, %edx
xorl %esi, %esi
callq 0x2100
movl %ebp, 0xa8(%rbx)
movq 0x6383(%rip), %rdi      # 0xc2e8
testl %ebp, %ebp
leaq 0x2930(%rip), %rax      # 0x889e
leaq 0x245c(%rip), %rsi      # 0x83d1
cmoveq %rax, %rsi
callq 0x4d54
testq %rax, %rax
je 0x6028
movq %rax, %r14
movq %rax, %rdi
callq 0x20c0
cmpq $0x30, %rax
jne 0x6028
leaq 0xa8(%rbx), %rdi
movq %r14, %rax
addq $0x4, %rax
movl $0x1, %ecx
movb -0x1(%rax), %dl
movb %dl, (%r14,%rcx,2)
movb (%rax), %dl
movb %dl, 0x1(%r14,%rcx,2)
incq %rcx
addq $0x3, %rax
cmpq $0x10, %rcx
jne 0x5faf
movb $0x0, 0x20(%r14)
cmpb $0x1, 0x62b2(%rip)      # 0xc288
je 0x601e
movq %r14, %rdi
callq 0x4a90
movq %rax, %r15
movups (%rax), %xmm0
movups %xmm0, 0x98(%rbx)
movl $0x98, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2100
movq %rbx, %rdi
callq 0x39ec
movq %r14, %rdi
callq 0x2280
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2280
movq %r14, %rsi
callq 0x3544
jmp 0x5fd8
callq 0x3577
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: verifyFile_final
void verifyFile_final(vfy_t *vfy) {
  unsigned char md5[16];
  
  MD5_Final(md5, &vfy->ctx);
  if (memcmp(vfy->hash1, md5, 16) != 0) {
    if (vfy->input)
      ERROR("Input file had errors. Output may or may not be usable.");
    else
      ERROR("Output verification failed. Wrong key?");
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4346
movdqu 0x98(%rbx), %xmm0
pcmpeqb (%r14), %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x606a
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movl 0xa8(%rbx), %ebx
movq 0x5f61(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
movl $0xa, %edi
callq 0x22c0
movq (%r14), %rdi
testl %ebx, %ebx
jne 0x6090
callq 0x35e6
callq 0x35b6
// File: /workspace/github_c_makefile_star2_O1/otrtool[P]otrtool/src/main.c
// Function: processFile
void processFile() {
  int storeKeyphrase;
  switch (opts.action) {
    case ACTION_INFO:
      // TODO: output something nicer than just the querystring
      dumpQuerystring(header);
      break;
    case ACTION_FETCHKEY:
      fetchKeyphrase();
      break;
    case ACTION_DECRYPT:
      storeKeyphrase = 1;
      if (opts.keyphrase == NULL) {
        storeKeyphrase = 0;
        keyphrase = keycache_get(queryGetParam(header, "FH"));
        if (keyphrase)
          fprintf(stderr, "Keyphrase from cache: %s\n", keyphrase);
        else
          fetchKeyphrase();
      }
      else {
        keyphrase = strdup(opts.keyphrase);
      }
      decryptFile();
      if (storeKeyphrase)
        keycache_put(queryGetParam(header, "FH"), keyphrase);
      break;
    case ACTION_VERIFY:
      verifyOnly();
      break;
  }
}

// Assembly:
pushq %rbx
movl 0x5a32(%rip), %eax      # 0xc280
cmpq $0x3, %rax
ja 0x68f1
leaq 0x1811(%rip), %rcx      # 0x8070
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x5a79(%rip), %rdi      # 0xc2e8
popq %rbx
jmp 0x4ebd
movq 0x5a34(%rip), %rbx      # 0xc2b0
testq %rbx, %rbx
je 0x6898
movq %rbx, %rdi
callq 0x2440
movq %rax, 0x5c98(%rip)      # 0xc528
jmp 0x68c4
popq %rbx
jmp 0x5bcd
movq 0x5a49(%rip), %rdi      # 0xc2e8
leaq 0x1ff8(%rip), %rsi      # 0x889e
callq 0x4d54
movq %rax, %rdi
callq 0x5a5a
movq %rax, 0x5c6e(%rip)      # 0xc528
testq %rax, %rax
jne 0x68f9
callq 0x5bcd
callq 0x6252
testq %rbx, %rbx
je 0x68f1
movq 0x5a13(%rip), %rdi      # 0xc2e8
leaq 0x1fc2(%rip), %rsi      # 0x889e
callq 0x4d54
movq 0x5c40(%rip), %rsi      # 0xc528
movq %rax, %rdi
popq %rbx
jmp 0x5b2c
popq %rbx
retq
popq %rbx
jmp 0x26d0
movq 0x56d8(%rip), %rcx      # 0xbfd8
movq (%rcx), %rdi
leaq 0x22fa(%rip), %rsi      # 0x8c04
movq %rax, %rdx
xorl %eax, %eax
callq 0x2330
jmp 0x68c4
// File: /workspace/github_c_makefile_star2_O1/kkanellis[P]matvec-sparse/matvec_mpi_p2p.c
// Function: create_mpi_datatypes
void create_mpi_datatypes(MPI_Datatype *proc_info_type) {
    MPI_Datatype oldtypes[2];
    MPI_Aint offsets[2];
    int blockcounts[2];

    /* create `proc_info_t` datatype */
    offsets[0] = 0;
    oldtypes[0] = MPI_INT;
    blockcounts[0] = 6;

    MPI_Type_create_struct(1, blockcounts, offsets, oldtypes, proc_info_type);
    MPI_Type_commit(proc_info_type);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
movq 0x3f83(%rip), %rax      # 0x7fa8
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rsi
movl $0x6, (%rsi)
movl $0x1, %edi
movq %rbx, %r8
callq 0x2150
movq %rbx, %rdi
callq 0x2180
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/5-Signal/handle_int.c
// Function: main
int main(void)
{
	int c;
	signal(SIGINT, sig_handler);
	signal(SIGQUIT, sig_handler);
	printf("Press enter\n");
	c = getchar();
	printf("End of program (%c) \n", c);
	return 0;
}

// Assembly:
pushq %rbx
leaq -0x2b(%rip), %rbx       # 0x116c
movl $0x2, %edi
movq %rbx, %rsi
callq 0x1060
movl $0x3, %edi
movq %rbx, %rsi
callq 0x1060
leaq 0xe90(%rip), %rdi       # 0x2048
callq 0x1030
callq 0x1050
leaq 0xe3b(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/icmp.c
// Function: probe_setup
void
probe_setup()
{
	int i;

	if (fd4 < 0) {
		errno = fd4errno;
		perror("socket (IPv4)");
		exit(1);
	}
	if (fd6 < 0) {
		errno = fd6errno;
		perror("socket (IPv6)");
		exit(1);
	}

	/* Prepare datapacket */
	ident = getpid() & 0xffff;
	for (i=0; i<datalen; i++) {
		outpacket[ICMP_MINLEN + i] = '0' + i;
		outpacket6[ICMP6_MINLEN + i] = '0' + i;
	}

	evutil_make_socket_nonblocking(fd4);
	ev_read4 = event_new(ev_base, fd4, EV_READ|EV_PERSIST, read_packet4, NULL);
	event_add(ev_read4, NULL);
	evutil_make_socket_nonblocking(fd6);
	ev_read6 = event_new(ev_base, fd6, EV_READ|EV_PERSIST, read_packet6, NULL);
	event_add(ev_read6, NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x34b2(%rip), %r14      # 0x7230
cmpl $0x0, (%r14)
js 0x3e47
leaq 0x34a9(%rip), %rbx      # 0x7238
cmpl $0x0, (%rbx)
js 0x3e4c
callq 0x2290
movzwl %ax, %eax
movl %eax, 0x34c2(%rip)      # 0x7268
movslq 0x3433(%rip), %rax      # 0x71e0
testq %rax, %rax
jle 0x3dd7
xorl %ecx, %ecx
leaq 0x34b5(%rip), %rdx      # 0x7270
leaq 0x134ae(%rip), %rsi     # 0x17270
leal 0x30(%rcx), %edi
movb %dil, 0x8(%rcx,%rdx)
movb %dil, 0x8(%rcx,%rsi)
incq %rcx
cmpq %rcx, %rax
jne 0x3dc2
movl (%r14), %edi
callq 0x2270
leaq 0x3442(%rip), %r15      # 0x7228
movq (%r15), %rdi
movl (%r14), %esi
leaq 0x5e(%rip), %rcx        # 0x3e51
movl $0x12, %edx
xorl %r8d, %r8d
callq 0x2160
movq %rax, 0x23469(%rip)     # 0x27270
movq %rax, %rdi
xorl %esi, %esi
callq 0x20b0
movl (%rbx), %edi
callq 0x2270
movq (%r15), %rdi
movl (%rbx), %esi
leaq 0x135(%rip), %rcx       # 0x3f59
movl $0x12, %edx
xorl %r8d, %r8d
callq 0x2160
movq %rax, 0x23440(%rip)     # 0x27278
movq %rax, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x20b0
callq 0x241a
callq 0x23f5
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/icmp.c
// Function: read_packet4
static void
read_packet4(int fd, short what, void *thunk)
{
	char inpacket[IP_MAXPACKET];
	struct sockaddr_in sin;
	struct ip *ip;
	struct ip *oip;
	struct icmp *icp;
	struct icmp *oicp;
	socklen_t salen;
	int hlen;
	int seq;
	int n;

	salen = sizeof(sin);
	memset(inpacket, 0, sizeof(inpacket));
	n = recvfrom(fd, inpacket, sizeof(inpacket), 0,
	    (struct sockaddr *)&sin, &salen);
	if (n < 0) {
		return;
	}

	ip = (struct ip *)inpacket;
	hlen = ip->ip_hl << 2;
	if (ip->ip_p != IPPROTO_ICMP) {
		return;
	}
	if (n < hlen + ICMP_MINLEN) {
		return;
	}

	icp = (struct icmp *)(inpacket + hlen);
	if (icp->icmp_type == ICMP_ECHOREPLY) {
		if (icp->icmp_id != htons(ident))
			return; /*  skip other ping sessions */

		seq = ntohs(icp->icmp_seq);
		find_marktarget(AF_INET, &sin.sin_addr, seq, '.');
	} else {
		/* Skip short icmp error packets. */
		if (n < ICMP_MINLEN * 2 + sizeof(struct ip))
			return;

		/* Check aspects of the original packet */
		oip = (struct ip *)icp->icmp_data;
		oicp = (struct icmp *)(oip + 1);
		if (oip->ip_p != IPPROTO_ICMP)
			return;
		if (oicp->icmp_type != ICMP_ECHO)
			return;
		if (oicp->icmp_id != htons(ident))
			return;

		seq = ntohs(oicp->icmp_seq);
		if (icp->icmp_type == ICMP_UNREACH)
			find_marktarget(AF_INET, &oip->ip_dst, seq, '#');
		else
			find_marktarget(AF_INET, &oip->ip_dst, seq, '%');
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10020, %rsp          # imm = 0x10020
movl %edi, %ebx
leaq 0xc(%rsp), %r14
movl $0x10, (%r14)
leaq 0x20(%rsp), %r15
movl $0xffff, %edx           # imm = 0xFFFF
movq %r15, %rdi
xorl %esi, %esi
callq 0x20e0
leaq 0x10(%rsp), %r8
movl $0xffff, %edx           # imm = 0xFFFF
movl %ebx, %edi
movq %r15, %rsi
xorl %ecx, %ecx
movq %r14, %r9
callq 0x2120
testl %eax, %eax
js 0x3f45
cmpb $0x1, 0x29(%rsp)
jne 0x3f45
movl 0x20(%rsp), %ecx
shll $0x2, %ecx
andl $0x3c, %ecx
leal 0x8(%rcx), %edx
cmpl %eax, %edx
jg 0x3f45
leaq (%rsp,%rcx), %rsi
addq $0x20, %rsi
movb (%rsi), %cl
testb %cl, %cl
je 0x3f15
andl $0x7ffffffc, %eax       # imm = 0x7FFFFFFC
cmpl $0x24, %eax
jb 0x3f45
cmpb $0x1, 0x11(%rsi)
jne 0x3f45
cmpb $0x8, 0x1c(%rsi)
jne 0x3f45
movzwl 0x337d(%rip), %eax      # 0x7268
rolw $0x8, %ax
cmpw %ax, 0x20(%rsi)
jne 0x3f45
movzwl 0x22(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %edx
addq $0x18, %rsi
movl $0x2, %edi
cmpb $0x3, %cl
jne 0x3f52
movl $0x23, %ecx
jmp 0x3f40
movzwl 0x334c(%rip), %eax      # 0x7268
rolw $0x8, %ax
cmpw %ax, 0x4(%rsi)
jne 0x3f45
movzwl 0x6(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %edx
leaq 0x14(%rsp), %rsi
movl $0x2, %edi
movl $0x2e, %ecx
callq 0x4371
addq $0x10020, %rsp          # imm = 0x10020
popq %rbx
popq %r14
popq %r15
retq
movl $0x25, %ecx
jmp 0x3f40
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/icmp.c
// Function: read_packet6
static void
read_packet6(int fd, short what, void *thunk)
{
	char inpacket[IP_MAXPACKET];
	struct sockaddr_in6 sin6;
	struct ip6_hdr *oip6;
	struct icmp6_hdr *icmp6h;
	struct icmp6_hdr *oicmp6h;
	socklen_t salen;
	int seq;
	int n;

	salen = sizeof(sin6);
	memset(inpacket, 0, sizeof(inpacket));
	n = recvfrom(fd, inpacket, sizeof(inpacket), 0,
	    (struct sockaddr *)&sin6, &salen);
	if (n < 0) {
		return;
	}
	if (n < ICMP6_MINLEN) {
		return;
	}

	/* SOCK_RAW for IPPROTO_ICMPV6 doesn't include IPv6 header */
	icmp6h = (struct icmp6_hdr *)(inpacket);
	if (icmp6h->icmp6_type == ICMP6_ECHO_REPLY) {
		if (icmp6h->icmp6_id != htons(ident))
			return; /*  skip other ping sessions */
		if (n != sizeof(struct icmp6_hdr) + datalen)
			return;

		seq = ntohs(icmp6h->icmp6_seq);
		find_marktarget(AF_INET6, &sin6.sin6_addr, seq, '.');
	} else {
		/* Skip short icmp error packets. */
		if (n < ICMP6_MINLEN * 2 + sizeof(struct ip6_hdr))
			return;

		/* Check aspects of the original packet */
		oip6 = (struct ip6_hdr *)(icmp6h + 1);
		oicmp6h = (struct icmp6_hdr *)(oip6 + 1);
		if (oip6->ip6_nxt != IPPROTO_ICMPV6)
			return;
		if (oicmp6h->icmp6_type != ICMP6_ECHO_REQUEST)
			return;
		if (oicmp6h->icmp6_id != htons(ident))
			return;

		seq = ntohs(oicmp6h->icmp6_seq);
		if (icmp6h->icmp6_type == ICMP6_DST_UNREACH)
			find_marktarget(AF_INET6, &oip6->ip6_dst, seq, '#');
		else
			find_marktarget(AF_INET6, &oip6->ip6_dst, seq, '%');
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10020, %rsp          # imm = 0x10020
movl %edi, %ebx
movq %rsp, %r14
movl $0x1c, (%r14)
leaq 0x20(%rsp), %r15
movl $0xffff, %edx           # imm = 0xFFFF
movq %r15, %rdi
xorl %esi, %esi
callq 0x20e0
leaq 0x4(%rsp), %r8
movl $0xffff, %edx           # imm = 0xFFFF
movl %ebx, %edi
movq %r15, %rsi
xorl %ecx, %ecx
movq %r14, %r9
callq 0x2120
testl %eax, %eax
js 0x3fad
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq $0x8, %rax
jae 0x3fba
addq $0x10020, %rsp          # imm = 0x10020
popq %rbx
popq %r14
popq %r15
retq
movb 0x20(%rsp), %cl
cmpb $-0x7f, %cl
jne 0x4002
movzwl 0x329e(%rip), %ecx      # 0x7268
rolw $0x8, %cx
cmpw %cx, 0x24(%rsp)
jne 0x3fad
movslq 0x3204(%rip), %rcx      # 0x71e0
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x3fad
movzwl 0x26(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %edx
leaq 0xc(%rsp), %rsi
movl $0xa, %edi
movl $0x2e, %ecx
jmp 0x404e
cmpl $0x38, %eax
jb 0x3fad
cmpb $0x3a, 0x2e(%rsp)
jne 0x3fad
movb 0x50(%rsp), %al
negb %al
jno 0x3fad
movzwl 0x324b(%rip), %eax      # 0x7268
rolw $0x8, %ax
cmpw %ax, 0x54(%rsp)
jne 0x3fad
leaq 0x40(%rsp), %rsi
movzwl 0x16(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %edx
movl $0xa, %edi
cmpb $0x1, %cl
jne 0x4049
movl $0x23, %ecx
jmp 0x404e
movl $0x25, %ecx
callq 0x4371
jmp 0x3fad
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/icmp.c
// Function: probe_cleanup
void
probe_cleanup()
{

	HASH_CLEAR(hh, hash);
	if (ev_read4)
		event_free(ev_read4);
	if (ev_read6)
		event_free(ev_read6);
}

// Assembly:
pushq %rax
movq 0x3200(%rip), %rax      # 0x7260
testq %rax, %rax
je 0x408c
movq 0x70(%rax), %rax
movq (%rax), %rdi
callq 0x21c0
movq 0x31e8(%rip), %rax      # 0x7260
movq 0x70(%rax), %rdi
callq 0x21c0
movq $0x0, 0x31d4(%rip) # 0x7260
movq 0x231dd(%rip), %rdi     # 0x27270
testq %rdi, %rdi
je 0x409d
callq 0x22f0
movq 0x231d4(%rip), %rdi     # 0x27278
testq %rdi, %rdi
je 0x40af
popq %rax
jmp 0x22f0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/icmp.c
// Function: probe_new
struct probe *
probe_new(const char *line, void *owner)
{
	union addr sa;
	struct probe *prb;
	int salen;

	prb = calloc(1, sizeof(*prb));
	if (prb == NULL) {
		perror("malloc");
		return (prb);
	}
	prb->owner = owner;
	strncat(prb->host, line, sizeof(prb->host) - 1);

	salen = sizeof(sa);
	if (evutil_parse_sockaddr_port(prb->host, &sa.sa, &salen) == 0) {
		sa(prb)->sa_family = sa.sa.sa_family;
		if (sa.sa.sa_family == AF_INET6) {
			memcpy(&sin6(prb)->sin6_addr, &sa.sin6.sin6_addr,
			    sizeof(sin6(prb)->sin6_addr));
		} else {
			memcpy(&sin(prb)->sin_addr, &sa.sin.sin_addr,
			    sizeof(sin(prb)->sin_addr));
		}
		prb->resolved = 1;
		activate(prb);
	} else {
		prb->dnstask = dnstask_new(prb->host, resolved, prb);
		if (prb->dnstask == NULL) {
			free(prb);
			return NULL;
		}
	}
	return (prb);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %r14
movl $0x1, %edi
movl $0xb8, %esi
callq 0x2100
testq %rax, %rax
je 0x4166
movq %rax, %rbx
movq %r15, 0xb0(%rax)
movl $0x3f, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2110
movq %rsp, %rdx
movl $0x1c, (%rdx)
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x20a0
testl %eax, %eax
je 0x4134
leaq 0x6e(%rip), %rsi        # 0x4181
movq %rbx, %rdi
movq %rbx, %rdx
callq 0x4d10
movq %rax, 0xa8(%rbx)
testq %rax, %rax
jne 0x4174
movq %rbx, %rdi
callq 0x21c0
jmp 0x4172
movzwl 0x4(%rsp), %eax
movw %ax, 0x44(%rbx)
cmpw $0xa, %ax
jne 0x414e
movups 0xc(%rsp), %xmm0
movups %xmm0, 0x4c(%rbx)
jmp 0x4155
movl 0x8(%rsp), %eax
movl %eax, 0x48(%rbx)
movl $0x1, 0x40(%rbx)
movq %rbx, %rdi
callq 0x3020
jmp 0x4174
leaq 0xf81(%rip), %rdi       # 0x50ee
callq 0x2150
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/icmp.c
// Function: probe_free
void
probe_free(struct probe *prb)
{

	if (prb->dnstask)
		dnstask_free(prb->dnstask);
	deactivate(prb);
	free(prb);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xa8(%rdi), %rdi
testq %rdi, %rdi
je 0x4205
callq 0x4e14
movq %rbx, %rdi
callq 0x3710
movq %rbx, %rdi
popq %rbx
jmp 0x21c0
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/icmp.c
// Function: probe_send
void
probe_send(struct probe *prb, int seq)
{
	int len;
	int n;

	prb->last_seq = seq;
	if (!prb->resolved) {
		target_mark(prb->owner, seq, '@');
		return;
	}

	if (prb->duplicate) {
		target_mark(prb->owner, seq, '"'); /* transmit error */
		return;
	}

	if (sa(prb)->sa_family == AF_INET6) {
		n = write_packet6(sa(prb), seq & 0xffff);
		len = ICMP6_MINLEN + datalen;
	} else {
		n = write_packet4(sa(prb), seq & 0xffff);
		len = ICMP_MINLEN + datalen;
	}

	if (n < 0) {
		target_mark(prb->owner, seq, '!'); /* transmit error */
	} else if (n != len) {
		target_mark(prb->owner, seq, '$'); /* partial transmit */
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, 0x68(%rdi)
cmpl $0x0, 0x40(%rdi)
je 0x4292
movl $0x22, %edx
cmpq $0x0, 0x60(%r14)
jne 0x4297
leaq 0x44(%r14), %r8
movl 0x2fa2(%rip), %ecx      # 0x71e0
leal 0x8(%rcx), %eax
movl %ebx, %edx
rolw $0x8, %dx
cmpw $0xa, 0x44(%r14)
jne 0x42ac
movl $0x80, 0x13017(%rip)    # 0x17270
leaq 0x13010(%rip), %rsi     # 0x17270
movw %dx, 0x1300f(%rip)      # 0x17276
movzwl 0x2ffa(%rip), %ecx      # 0x7268
rolw $0x8, %cx
movw %cx, 0x12ffb(%rip)      # 0x17274
leaq 0x2fb8(%rip), %rcx      # 0x7238
movl (%rcx), %edi
movslq %eax, %rdx
xorl %ecx, %ecx
movl $0x1c, %r9d
jmp 0x4340
movl $0x40, %edx
movq 0xb0(%r14), %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2554
movl $0x8, 0x2fba(%rip)      # 0x7270
movw %dx, 0x2fb9(%rip)       # 0x7276
movzwl 0x2fa4(%rip), %edx      # 0x7268
rolw $0x8, %dx
movw %dx, 0x2fa5(%rip)       # 0x7274
cmpl $-0x6, %ecx
jl 0x42f6
addl $0xa, %ecx
leaq 0x2f92(%rip), %rsi      # 0x7270
xorl %edx, %edx
movzwl (%rsi), %edi
addq $0x2, %rsi
addl %edi, %edx
addl $-0x2, %ecx
cmpl $0x3, %ecx
jg 0x42e0
addl $-0x2, %ecx
jmp 0x4301
leaq 0x2f73(%rip), %rsi      # 0x7270
xorl %edx, %edx
movl %eax, %ecx
cmpl $0x1, %ecx
jne 0x430b
movzbl (%rsi), %ecx
addl %ecx, %edx
movl %edx, %ecx
sarl $0x10, %ecx
movzwl %dx, %edx
addl %ecx, %edx
movl %edx, %ecx
shrl $0x10, %ecx
addl %edx, %ecx
notl %ecx
movw %cx, 0x2f4d(%rip)       # 0x7272
leaq 0x2f44(%rip), %rsi      # 0x7270
leaq 0x2efd(%rip), %rcx      # 0x7230
movl (%rcx), %edi
movslq %eax, %rdx
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0x2050
testl %eax, %eax
js 0x4367
movl 0x2e91(%rip), %ecx      # 0x71e0
addl $0x8, %ecx
movl $0x24, %edx
cmpl %eax, %ecx
jne 0x4297
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x21, %edx
jmp 0x4297
// File: /workspace/github_c_makefile_star2_O1/martintopholm[P]xping/icmp.c
// Function: find_marktarget
static void
find_marktarget(int af, void *address, int seq, int ch)
{
	struct probe *prb;
	int npkts;

	prb = find(af, address);
	if (prb == NULL)
		return; /* unknown source address */
	npkts = prb->last_seq;
	if ((npkts & 0xffff) < seq)
	    npkts -= 1<<16;
	target_mark(prb->owner, (npkts & ~0xffff) | seq, ch);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
callq 0x3ae5
testq %rax, %rax
je 0x43b0
movl 0x68(%rax), %ecx
movzwl %cx, %edx
movl $0xffff0000, %r8d       # imm = 0xFFFF0000
leal (%rcx,%r8), %esi
cmpl %ebp, %edx
cmovgel %ecx, %esi
movq 0xb0(%rax), %rdi
andl %r8d, %esi
orl %ebp, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2554
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop