LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/otrtool[P]otrtool/src/blowfish.c
// Function: bf_cbc_decrypt
void bf_cbc_decrypt(const bf_state_t *st, void *data_, size_t len, void *iv_)
{
  uint8_t *data = data_;
  uint8_t *iv = iv_;
  uint32_t xL, xR;
  uint32_t ivL, ivR, ivLn, ivRn;
  size_t i;

  ivL = load_uint32le(iv);
  ivR = load_uint32le(iv+4);

  for (i=0; i<=len-8; i+=8) {
    xL = ivLn = load_uint32le(data+i);
    xR = ivRn = load_uint32le(data+i+4);
    BF_DECRYPT(st, xL, xR);
    store_uint32le(data+i, xL ^ ivL);
    store_uint32le(data+i+4, xR ^ ivR);
    ivL = ivLn;
    ivR = ivRn;
  }

  store_uint32le(iv, ivL);
  store_uint32le(iv+4, ivR);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbp
movq %rdi, %r15
movl (%rcx), %eax
movl %eax, 0x8(%rsp)
movq %rcx, 0x18(%rsp)
movl 0x4(%rcx), %eax
movl %eax, 0xc(%rsp)
addq $-0x8, %rdx
movq %rdx, 0x20(%rsp)
xorl %ebx, %ebx
cmpq 0x20(%rsp), %rbx
ja 0x34d9
movl (%rbp,%rbx), %r12d
movl 0x4(%rbp,%rbx), %r13d
movl $0x411, %r14d           # imm = 0x411
movl %r13d, 0x10(%rsp)
movl %r12d, 0x14(%rsp)
leaq -0x400(%r14), %rax
cmpq $0x2, %rax
jb 0x346f
xorl (%r15,%r14,4), %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x31fa
xorl %r13d, %eax
decq %r14
movl %r12d, %r13d
movl %eax, %r12d
jmp 0x3445
movl 0x8(%rsp), %eax
xorl 0x1000(%r15), %eax
xorl %r13d, %eax
movl %eax, %esi
shrl $0x10, %esi
movl %eax, %ecx
shrl $0x18, %ecx
movl 0xc(%rsp), %edx
xorl 0x1004(%r15), %edx
movb %cl, 0x3(%rbp,%rbx)
movb %sil, 0x2(%rbp,%rbx)
movb %ah, 0x1(%rbp,%rbx)
movb %al, (%rbp,%rbx)
xorl %r12d, %edx
movl %edx, %eax
shrl $0x10, %eax
movl %edx, %ecx
shrl $0x18, %ecx
movb %cl, 0x7(%rbp,%rbx)
movb %al, 0x6(%rbp,%rbx)
movb %dh, 0x5(%rbp,%rbx)
movb %dl, 0x4(%rbp,%rbx)
addq $0x8, %rbx
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x3420
movl 0x8(%rsp), %ebx
movl %ebx, %eax
shrl $0x10, %eax
movl %ebx, %ecx
shrl $0x18, %ecx
movq 0x18(%rsp), %rdx
movb %cl, 0x3(%rdx)
movb %al, 0x2(%rdx)
movb %bh, 0x1(%rdx)
movb %bl, (%rdx)
movl 0xc(%rsp), %ebx
movl %ebx, %eax
shrl $0x10, %eax
movl %ebx, %ecx
shrl $0x18, %ecx
movb %cl, 0x7(%rdx)
movb %al, 0x6(%rdx)
movb %bh, 0x5(%rdx)
movb %bl, 0x4(%rdx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/otrtool[P]otrtool/src/main.c
// Function: perrorf
void perrorf(const char *fmt, ...) {
  int errsv = errno;
  va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap);
  fputs(": ", stderr);
  errno = errsv; perror(NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x3584
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
callq 0x2030
movq %rax, %r14
movl (%rax), %ebp
movq %rsp, %rdx
movq %r15, 0x10(%rdx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x8a23(%rip), %r15      # 0xbfd8
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2320
movq (%r15), %rsi
leaq 0x516d(%rip), %rdi      # 0x8737
callq 0x2250
movl %ebp, (%r14)
xorl %edi, %edi
callq 0x2180
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/otrtool[P]otrtool/src/main.c
// Function: bin2hex
char * bin2hex(void *data_, int len) {
  unsigned char *data = data_;
  unsigned char *result = malloc(sizeof(char) * len * 2 + 1);
  result[len * 2] = 0;
  int foo;
  for (len-- ; len >= 0 ; len--) {
    foo = data[len] % 16;
    result[len*2 + 1] = foo > 9 ? 0x37 + foo : 0x30 + foo;
    foo = data[len] >> 4;
    result[len*2] = foo > 9 ? 0x37 + foo : 0x30 + foo;
  }
  return (char*)result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
leaq 0x1(,%r14,2), %rdi
callq 0x2310
movb $0x0, (%rax,%r14,2)
movl %r14d, %ecx
leal -0x1(,%r14,2), %edx
testl %ecx, %ecx
jle 0x366b
decq %rcx
movl %ecx, %esi
movb (%rbx,%rsi), %sil
movl %esi, %edi
andb $0xf, %dil
leal 0x37(%rdi), %r8d
leal 0x30(%rdi), %r9d
cmpb $0xa, %dil
movzbl %r8b, %edi
movzbl %r9b, %r8d
cmovael %edi, %r8d
leal -0x1(%rdx), %edi
movl %edx, %r9d
movb %r8b, (%rax,%r9)
movl %esi, %r8d
shrb $0x4, %r8b
leal 0x37(%r8), %r9d
orb $0x30, %r8b
cmpb $-0x60, %sil
movzbl %r9b, %esi
movzbl %r8b, %r8d
cmovael %esi, %r8d
movb %r8b, (%rax,%rdi)
addl $-0x2, %edx
jmp 0x360e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x20c0
shrq %rax
movslq %eax, %r14
leaq 0x1(%r14), %rdi
callq 0x2310
movb $0x0, (%rax,%r14)
movl %r14d, %ecx
leal -0x1(,%r14,2), %edx
movl $0xd0, %esi
testl %ecx, %ecx
jle 0x36fb
decq %rcx
leal -0x1(%rdx), %edi
movb (%rbx,%rdi), %dil
xorl %r8d, %r8d
cmpb $0x41, %dil
setae %r8b
leal (%r8,%r8,8), %r8d
addb %dil, %r8b
shlb $0x4, %r8b
movl %ecx, %edi
movl %edx, %r9d
movb (%rbx,%r9), %r9b
cmpb $0x61, %r9b
setb %r10b
shlb $0x5, %r10b
addb $-0x57, %r10b
cmpb $0x41, %r9b
movzbl %r10b, %r10d
cmovbl %esi, %r10d
addb %r9b, %r8b
addb %r10b, %r8b
movb %r8b, (%rax,%rdi)
addl $-0x2, %edx
jmp 0x36a3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leal 0x2(%r14), %eax
pushq $0x3
popq %rbp
cltd
idivl %ebp
movl %eax, %r15d
leal 0x1(,%r15,4), %eax
movslq %eax, %rdi
callq 0x2310
movq %rax, %rcx
movl %r14d, %eax
cltd
idivl %ebp
leaq 0x4abf(%rip), %rsi      # 0x81fc
movq %rcx, %rdx
testl %eax, %eax
jle 0x37a4
movzbl (%rbx), %edi
movl %edi, %r8d
shrl $0x2, %r8d
movb (%r8,%rsi), %r8b
movb %r8b, (%rdx)
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(%rdx)
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(%rdx)
andl $0x3f, %edi
movb (%rdi,%rsi), %dil
movb %dil, 0x3(%rdx)
addq $0x4, %rdx
addq $0x3, %rbx
decl %eax
jmp 0x3740
leal (%r15,%r15,2), %eax
decl %eax
cmpl %r14d, %eax
jle 0x37ce
movzbl (%rbx), %eax
movl %eax, %edi
shrl $0x2, %edi
movb (%rdi,%rsi), %dil
movb %dil, (%rdx)
shll $0x4, %eax
andl $0x30, %eax
movb (%rax,%rsi), %al
movb %al, 0x1(%rdx)
movb $0x3d, %al
jmp 0x3807
leal (%r15,%r15,2), %eax
cmpl %r14d, %eax
jle 0x3812
movzbl (%rbx), %eax
movl %eax, %edi
shrl $0x2, %edi
movb (%rdi,%rsi), %dil
movb %dil, (%rdx)
shll $0x4, %eax
andl $0x30, %eax
movzbl 0x1(%rbx), %edi
movl %edi, %r8d
shrl $0x4, %r8d
orl %eax, %r8d
movb (%r8,%rsi), %al
movb %al, 0x1(%rdx)
andl $0xf, %edi
movb (%rsi,%rdi,4), %al
movb %al, 0x2(%rdx)
movb $0x3d, 0x3(%rdx)
addq $0x4, %rdx
movb $0x0, (%rdx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpb $0x3d, -0x2(%rbx,%rdx)
jne 0x3851
pushq $-0x2
popq %rcx
jmp 0x385d
xorl %ecx, %ecx
cmpb $0x3d, -0x1(%rbx,%rdx)
sete %cl
negl %ecx
addl %eax, %ecx
movl %ecx, (%r15)
movslq %eax, %rdi
callq 0x2310
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
leaq (%r14,%r14,2), %rdx
leaq 0x4862(%rip), %rsi      # 0x80e0
cmpl %ecx, %edx
je 0x38db
movzbl (%rbx), %edi
movb (%rdi,%rsi), %dil
shlb $0x2, %dil
movzbl 0x1(%rbx), %r8d
movb (%r8,%rsi), %r8b
movl %r8d, %r9d
shrb $0x4, %r9b
orb %dil, %r9b
movb %r9b, (%rax,%rcx)
shlb $0x4, %r8b
movzbl 0x2(%rbx), %edi
movb (%rdi,%rsi), %dil
movl %edi, %r9d
shrb $0x2, %r9b
orb %r8b, %r9b
movb %r9b, 0x1(%rax,%rcx)
shlb $0x6, %dil
movzbl 0x3(%rbx), %r8d
orb (%r8,%rsi), %dil
movb %dil, 0x2(%rax,%rcx)
addq $0x4, %rbx
addq $0x3, %rcx
jmp 0x387e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
pushq $0x26
popq %rbp
movl %ebp, %esi
callq 0x2090
movq %rax, %rbx
movq %r14, %rdi
callq 0x20c0
movslq %eax, %r12
movq %rax, %r13
shlq $0x20, %r13
xorl %r15d, %r15d
testq %rbx, %rbx
je 0x39cc
incq %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x20e0
testl %eax, %eax
jne 0x3966
cmpb $0x3d, (%rbx,%r12)
je 0x3975
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2090
movq %rax, %rbx
jmp 0x3941
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r13
sarq $0x20, %r13
addq %r13, %rbx
pushq $0x26
popq %rsi
movq %rbx, %rdi
callq 0x2090
movq %rax, %r14
testq %rax, %rax
jne 0x39aa
movq %rbx, %rdi
callq 0x20c0
movq %rax, %r14
addq %rbx, %r14
subq %rbx, %r14
leaq 0x1(%r14), %rdi
callq 0x2310
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x20f0
movb $0x0, (%r15,%r14)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq %rsp, %rbp
movw $0x203e, (%rbp)         # imm = 0x203E
pushq $0x2
popq %r15
pushq $0x20
popq %r13
movq 0x85d1(%rip), %r9       # 0xbfd8
pushq $0x51
popq %r12
pushq $0x1
popq %r14
movl %r15d, %eax
movb (%rbx), %cl
cltq
testb %cl, %cl
je 0x3a5f
leal -0x7f(%rcx), %esi
cmpb $-0x5f, %sil
movzbl %cl, %ecx
cmovbl %r13d, %ecx
movb %cl, (%rsp,%rax)
incl %eax
cmpl $0x50, %eax
je 0x3a37
incq %rbx
jmp 0x3a12
movb $0xa, 0x50(%rsp)
movq (%r9), %rcx
movq %rbp, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2480
movq 0x8584(%rip), %r9       # 0xbfd8
movw $0x203e, (%rsp)         # imm = 0x203E
movl %r15d, %eax
jmp 0x3a32
leal 0x1(%rax), %ecx
movb $0xa, (%rsp,%rax)
cmpl $0x3, %ecx
jne 0x3a7a
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %ecx, %rsi
movq (%r9), %rcx
movq %rsp, %rdi
pushq $0x1
popq %rdx
callq 0x2480
jmp 0x3a6b
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorl %eax, %eax
cmpb $0x26, (%rdi)
jne 0x3aaf
movb $0x26, (%rsp)
incq %rbx
pushq $0x1
popq %rax
pushq $0x1
popq %rbp
movq 0x851f(%rip), %r13      # 0xbfd8
movq %rsp, %r14
pushq $0x1
popq %r15
pushq $0x51
popq %r12
movzbl (%rbx), %ecx
movslq %eax, %rdx
cmpl $0x26, %ecx
je 0x3ae4
testl %ecx, %ecx
je 0x3b21
cltq
movb %cl, (%rsp,%rax)
incl %eax
cmpl $0x50, %eax
je 0x3b02
incq %rbx
jmp 0x3ac4
movb $0xa, (%rsp,%rdx)
incl %edx
movslq %edx, %rsi
movq (%r13), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x2480
movb (%rbx), %cl
xorl %eax, %eax
jmp 0x3ad3
movb $0xa, 0x50(%rsp)
movq (%r13), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2480
movb $0x20, (%rsp)
movl %ebp, %eax
jmp 0x3adf
movb $0xa, (%rsp,%rdx)
cmpl $0x50, %edx
jne 0x3b39
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl %eax
movslq %eax, %rsi
movq (%r13), %rcx
movq %rsp, %rdi
pushq $0x1
popq %rdx
callq 0x2480
jmp 0x3b2a
// File: /workspace/github_c_makefile_star2_O2/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 0x52bd(%rip), %xmm0     # 0x8fb9
movups %xmm0, 0x19(%rsp)
movaps 0x52a8(%rip), %xmm0     # 0x8fb0
movaps %xmm0, 0x10(%rsp)
movapd 0x528b(%rip), %xmm0     # 0x8fa0
movapd %xmm0, (%rsp)
cmpb $0x0, 0x856b(%rip)      # 0xc28c
jne 0x3dff
testq %rsi, %rsi
jle 0x3dc9
movq %rdi, %rbx
movq 0x8546(%rip), %rax      # 0xc280
cmpq %rdi, %rax
jle 0x3d50
andq $0x0, 0x8539(%rip)      # 0xc280
andl $0x0, 0x853a(%rip)      # 0xc288
xorl %eax, %eax
movq %rbx, %rcx
subq %rax, %rcx
cmpq $0x200000, %rcx         # imm = 0x200000
setl %al
testq %rbx, %rbx
setne %cl
testb %al, %cl
jne 0x3dff
cmpb $0x0, 0x852b(%rip)      # 0xc2a0
je 0x3e1f
movq 0x822e(%rip), %r14      # 0xbfb0
cvtsi2sd %rbx, %xmm0
mulsd 0x42d9(%rip), %xmm0     # 0x8068
movq (%r14), %rdi
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
leaq 0x4506(%rip), %rsi      # 0x82a8
movb $0x1, %al
callq 0x2340
movq (%r14), %rdi
callq 0x2270
movq 0x8220(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x2270
movq %rbx, 0x84b9(%rip)      # 0xc280
jmp 0x3dff
cmpb $0x0, 0x84d0(%rip)      # 0xc2a0
je 0x3e07
movq 0x81d7(%rip), %rbx      # 0xbfb0
movq (%rbx), %rsi
leaq 0x4506(%rip), %rdi      # 0x82e9
callq 0x2250
movq (%rbx), %rdi
callq 0x2270
andq $0x0, 0x8488(%rip)      # 0xc280
andl $0x0, 0x8489(%rip)      # 0xc288
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq 0x81ca(%rip), %rax      # 0xbfd8
movq (%rax), %rsi
leaq 0x449c(%rip), %rdi      # 0x82b4
callq 0x2250
jmp 0x3df0
movq 0x81b2(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
imulq $0x28, %rbx, %rax
cqto
idivq %rsi
movq %rax, %r8
imulq $0x64, %rbx, %rax
cqto
idivq %rsi
movl 0x8444(%rip), %ecx      # 0xc288
leal 0x1(%rcx), %edx
movl %edx, 0x843b(%rip)      # 0xc288
andl $0x3, %ecx
leaq 0x4438(%rip), %rdx      # 0x828f
movsbl (%rcx,%rdx), %r9d
leaq 0x4431(%rip), %rsi      # 0x8294
movq %rsp, %rcx
movl %r8d, %edx
movl %eax, %r8d
xorl %eax, %eax
callq 0x2340
jmp 0x3db1
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq %rdi, %rdx
movq %rsp, %rdi
xorl %esi, %esi
callq 0x2440
movl %eax, %ebx
callq 0x2030
movl %ebx, (%rax)
testl %ebx, %ebx
jne 0x3ea5
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x812c(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rcx
leaq 0x4437(%rip), %rdi      # 0x82f8
pushq $0xe
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2480
movq (%r14), %rcx
leaq 0x485e(%rip), %rdi      # 0x8737
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x2480
xorl %edi, %edi
callq 0x2180
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsp, %rsi
callq 0x21b0
movl %eax, %ebx
callq 0x2030
movl %ebx, (%rax)
testl %ebx, %ebx
jne 0x3f18
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x80b9(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rcx
leaq 0x43d3(%rip), %rdi      # 0x8307
pushq $0xc
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2480
movq (%r14), %rcx
leaq 0x47eb(%rip), %rdi      # 0x8737
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x2480
xorl %edi, %edi
callq 0x2180
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/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 0x2310
movq %rax, %rbx
movq 0x81b7(%rip), %rcx      # 0xc2e0
pushq $0x1
popq %rdx
movl $0x200, %esi            # imm = 0x200
movq %rax, %rdi
callq 0x2370
testq %rax, %rax
jne 0x4152
movq 0x819b(%rip), %rdi      # 0xc2e0
callq 0x2380
testl %eax, %eax
je 0x425f
movq 0x8187(%rip), %rdi      # 0xc2e0
callq 0x2380
testl %eax, %eax
jne 0x4202
movups 0x407f(%rip), %xmm0     # 0x81ec
movq %rsp, %rsi
movups %xmm0, 0xc(%rsi)
movaps 0x4065(%rip), %xmm0     # 0x81e0
movaps %xmm0, (%rsi)
leaq 0x20(%rsp), %r14
pushq $0x1c
popq %rdx
movq %r14, %rdi
callq 0x308c
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3230
movb $0x0, 0x200(%rbx)
leaq 0x41c0(%rip), %rsi      # 0x836c
movq %rbx, %rdi
callq 0x2060
testq %rax, %rax
je 0x4224
movb $0x0, (%rax)
cmpb $0x1, 0x80d5(%rip)      # 0xc298
je 0x41d3
movq %rbx, %rax
addq $0x1068, %rsp           # imm = 0x1068
popq %rbx
popq %r14
retq
movq 0x7dfe(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
leaq 0x41b6(%rip), %rdi      # 0x839a
callq 0x2250
movq %rbx, %rdi
callq 0x3a8d
movq (%r14), %rsi
leaq 0x45a9(%rip), %rdi      # 0x87a4
callq 0x2250
jmp 0x41c5
movq 0x7dcf(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x22d0
movq (%r14), %rcx
leaq 0x412e(%rip), %rdi      # 0x834e
pushq $0x1d
jmp 0x4244
movq 0x7dad(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x22d0
movq (%r14), %rcx
leaq 0x412f(%rip), %rdi      # 0x8371
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x2480
movq (%r14), %rsi
movl %ebx, %edi
callq 0x22d0
pushq $0x1
popq %rdi
callq 0x22a0
movq 0x7d72(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rcx
leaq 0x40c0(%rip), %rdi      # 0x833b
pushq $0x12
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2480
movq (%r14), %rcx
leaq 0x44a4(%rip), %rdi      # 0x8737
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x2480
xorl %edi, %edi
callq 0x2180
jmp 0x4257
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x802c(%rip), %rbx      # 0xc2e8
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2ffb
pushq $0x10
popq %rbp
movq %rax, %rdi
movl %ebp, %esi
callq 0x35e7
movq %rax, %r13
movq 0x8008(%rip), %r14      # 0xc2f0
movq %r14, %rdi
callq 0x20c0
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2ffb
movq %rax, %rdi
movl %ebp, %esi
callq 0x35e7
movq %rax, %r14
pushq $0x39
popq %rdi
callq 0x2310
movq %rax, %r12
pushq $0xd
popq %rdx
movq %rax, %rdi
movq %r13, %rsi
callq 0x20f0
leaq 0xd(%r12), %rdi
pushq $0x4
popq %rdx
movq %r15, %rsi
callq 0x20f0
leaq 0x4(%r15), %rbp
leaq 0x11(%r12), %rdi
pushq $0xb
popq %rdx
movq %r14, %rsi
callq 0x20f0
leaq 0x1c(%r12), %rdi
pushq $0x2
popq %rbx
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x20f0
addq $0x6, %r15
leaq 0x1e(%r12), %rdi
movq %r13, %rsi
addq $0x15, %rsi
pushq $0xb
popq %rdx
callq 0x20f0
leaq 0x29(%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x20f0
leaq 0x2b(%r12), %rdi
movq %r14, %rsi
addq $0x13, %rsi
pushq $0xd
popq %rdx
callq 0x20f0
movb $0x0, 0x38(%r12)
cmpb $0x1, 0x7ef5(%rip)      # 0xc298
je 0x43da
movq %r12, %rdi
callq 0x3673
movq %rax, %rbx
movq %r12, %rdi
callq 0x2290
movq %r13, %rdi
callq 0x2290
movq %r14, %rdi
callq 0x2290
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7bf7(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
leaq 0x3fcb(%rip), %rsi      # 0x83b6
movq %r12, %rdx
xorl %eax, %eax
callq 0x2340
jmp 0x43a5
// File: /workspace/github_c_makefile_star2_O2/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 0x482c
movq (%rbx), %rdi
addq %r14, %rsi
callq 0x23e0
testq %rax, %rax
je 0x482a
movq %rax, (%rbx)
movq 0x8(%rbx), %r12
addq %r12, %rax
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2170
addq %r14, %r12
movq %r12, 0x8(%rbx)
movq %r14, %rax
jmp 0x482c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4851
xorl %ebx, %ebx
jmp 0x48bc
movq %rdx, %r12
movl %esi, %r15d
movq %rdi, %r14
addl $-0x8, %r15d
movq %r15, %rdi
callq 0x2310
movq %rax, %rbx
leaq 0x8(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2170
leaq 0x8(%rsp), %r13
pushq $0x1c
popq %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x308c
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x33ef
leaq 0x3c8b(%rip), %rsi      # 0x852e
movq %rbx, %rdi
callq 0x2060
testq %rax, %rax
je 0x48ff
movb $0x0, (%rax)
cmpb $0x1, 0x79de(%rip)      # 0xc298
je 0x48d0
movq %rbx, %rax
addq $0x1050, %rsp           # imm = 0x1050
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x7701(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
leaq 0x3c7c(%rip), %rdi      # 0x855d
callq 0x2250
movq %rbx, %rdi
callq 0x3a8d
movq (%r14), %rsi
leaq 0x3eac(%rip), %rdi      # 0x87a4
callq 0x2250
jmp 0x48bc
movq 0x76d2(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x22d0
movq (%r14), %rcx
leaq 0x3c15(%rip), %rdi      # 0x8532
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
callq 0x2480
movq (%r14), %rsi
movl %ebx, %edi
callq 0x22d0
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/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 0x7657(%rip), %rdi      # 0xc310
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x4d3b
callq 0x2050
leaq 0x7651(%rip), %r14      # 0xc320
leaq 0x394d(%rip), %r15      # 0x8623
movq 0x7633(%rip), %rdx      # 0xc310
movq %r14, %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x23c0
testq %rax, %rax
je 0x4d2b
movq %r14, %rdi
movq %r15, %rsi
callq 0x23a0
movq %rax, %r13
xorl %edi, %edi
movq %r15, %rsi
callq 0x23a0
movq %rax, %r12
testq %rax, %rax
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
jne 0x4cd6
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2330
testl %eax, %eax
jne 0x4cd6
jmp 0x4d3e
movq 0x75de(%rip), %rdi      # 0xc310
callq 0x2380
testl %eax, %eax
je 0x4d4b
xorl %r12d, %r12d
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x7286(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rcx
leaq 0x38c1(%rip), %rdi      # 0x8628
pushq $0x5
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2480
movq (%r14), %rcx
leaq 0x39b8(%rip), %rdi      # 0x8737
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x2480
xorl %edi, %edi
callq 0x2180
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/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 0x4dac
cmpq $0x0, 0x7566(%rip)      # 0xc310
jne 0x4db4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4ca0
testq %rax, %rax
jne 0x4e2b
movq 0x752d(%rip), %rdi      # 0xc2f8
leaq 0x35fc(%rip), %rsi      # 0x83ce
callq 0x3911
movq 0x7532(%rip), %rdi      # 0xc310
leaq 0x38a6(%rip), %rsi      # 0x868b
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x2340
testl %eax, %eax
js 0x4e60
movq 0x7510(%rip), %rdi      # 0xc310
callq 0x2270
movq 0x71cc(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
movq 0x74f2(%rip), %rdx      # 0xc308
leaq 0x3882(%rip), %rsi      # 0x869f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2340
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2330
movq 0x719b(%rip), %rcx      # 0xbfd8
movq (%rcx), %rsi
testl %eax, %eax
jne 0x4e4d
leaq 0x381a(%rip), %rdi      # 0x8665
jmp 0x4e54
leaq 0x37da(%rip), %rdi      # 0x862e
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2250
movq 0x7171(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rcx
leaq 0x381b(%rip), %rdi      # 0x8697
pushq $0x7
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2480
movq (%r14), %rcx
leaq 0x38a3(%rip), %rdi      # 0x8737
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x2480
xorl %edi, %edi
callq 0x2180
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x18, %rsp
movq 0x711f(%rip), %rdi      # 0xc540
movzbl (%rdi), %eax
subl $0x2d, %eax
jne 0x542d
movzbl 0x1(%rdi), %eax
negl %eax
testl %eax, %eax
je 0x5444
leaq 0x3467(%rip), %rsi      # 0x88a1
callq 0x2280
movq %rax, %rcx
jmp 0x544e
movq 0x6b85(%rip), %rax      # 0xbfd0
movq (%rax), %rcx
movq %rcx, 0x6e8b(%rip)      # 0xc2e0
testq %rcx, %rcx
je 0x54c7
leaq 0x8(%rsp), %rdi
andl $0x0, 0x7(%rdi)
andq $0x0, (%rdi)
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x2370
testq %rax, %rax
jne 0x548b
movq 0x6e62(%rip), %rdi      # 0xc2e0
callq 0x2380
testl %eax, %eax
je 0x553c
movq 0x6e4e(%rip), %rdi      # 0xc2e0
callq 0x2380
testl %eax, %eax
jne 0x54e5
leaq 0x3415(%rip), %rsi      # 0x88b7
leaq 0x8(%rsp), %rdi
pushq $0xb
popq %rdx
callq 0x2200
testl %eax, %eax
jne 0x5507
callq 0x410b
movq %rax, 0x6e39(%rip)      # 0xc2f8
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0x6b0a(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rcx
leaq 0x33c1(%rip), %rdi      # 0x88a4
jmp 0x5558
movq 0x6aec(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x22d0
movq (%r14), %rcx
leaq 0x2e4b(%rip), %rdi      # 0x834e
pushq $0x1d
jmp 0x5527
movq 0x6aca(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x22d0
movq (%r14), %rcx
leaq 0x339d(%rip), %rdi      # 0x88c2
pushq $0x11
popq %rsi
pushq $0x1
popq %rdx
callq 0x2480
movq (%r14), %rsi
movl %ebx, %edi
callq 0x22d0
jmp 0x5582
movq 0x6a95(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rcx
leaq 0x2de3(%rip), %rdi      # 0x833b
pushq $0x12
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2480
movq (%r14), %rcx
leaq 0x31c7(%rip), %rdi      # 0x8737
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x2480
xorl %edi, %edi
callq 0x2180
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/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 $0xa8, %edx
xorl %esi, %esi
callq 0x2100
movl %ebp, 0xa8(%rbx)
movq 0x6d49(%rip), %rdi      # 0xc2f8
testl %ebp, %ebp
leaq 0x32e6(%rip), %rax      # 0x889e
leaq 0x2e12(%rip), %rsi      # 0x83d1
cmoveq %rax, %rsi
callq 0x3911
testq %rax, %rax
je 0x5698
movq %rax, %r14
movq %rax, %rdi
callq 0x20c0
cmpq $0x30, %rax
jne 0x5698
movq %r14, %rax
addq $0x3, %rax
pushq $0x4
popq %rcx
cmpq $0x31, %rcx
je 0x560e
movb -0x1(%r14,%rcx), %dl
movb %dl, -0x1(%rax)
movb (%r14,%rcx), %dl
movb %dl, (%rax)
addq $0x3, %rcx
addq $0x2, %rax
jmp 0x55f0
movb $0x0, 0x20(%r14)
cmpb $0x1, 0x6c7e(%rip)      # 0xc298
je 0x5662
movq %r14, %rdi
callq 0x3673
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 0x258c
movq %r14, %rdi
callq 0x2290
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2290
movq 0x696f(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
cmpl $0x0, 0xa8(%rbx)
leaq 0x32b1(%rip), %rax      # 0x892b
leaq 0x32a4(%rip), %rdx      # 0x8925
cmoveq %rax, %rdx
leaq 0x3278(%rip), %rsi      # 0x8904
movq %r14, %rcx
xorl %eax, %eax
callq 0x2340
jmp 0x561c
movq 0x6939(%rip), %r14      # 0xbfd8
movq (%r14), %rsi
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x22d0
movq (%r14), %rcx
leaq 0x321e(%rip), %rdi      # 0x88d4
pushq $0x2f
popq %rsi
pushq $0x1
popq %rdx
callq 0x2480
movq (%r14), %rsi
movl %ebx, %edi
callq 0x22d0
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ee1
movdqu 0x98(%rbx), %xmm0
pcmpeqb (%r14), %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x5712
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl 0xa8(%rbx), %ebp
movq 0x68b9(%rip), %rbx      # 0xbfd8
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%rbx), %rcx
testl %ebp, %ebp
jne 0x573c
leaq 0x3232(%rip), %rdi      # 0x896a
pushq $0x26
jmp 0x5745
leaq 0x31ef(%rip), %rdi      # 0x8932
pushq $0x37
popq %rsi
pushq $0x1
popq %rdx
callq 0x2480
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/otrtool[P]otrtool/src/main.c
// Function: verifyOnly
void verifyOnly() {
  vfy_t vfy;
  size_t n;
  static char buffer[65536];
  unsigned long long length;
  unsigned long long position;

  length = atoll(queryGetParam(header, "SZ")) - 522;
  fputs("Verifying otrkey...\n", stderr);
  verifyFile_init(&vfy, 1);
  for (position = 0; position < length; position += n) {
    showProgress(position, length);
    n = MIN(length - position, sizeof(buffer));
    if (fread(buffer, 1, n, file) < n) break;
    verifyFile_data(&vfy, buffer, n);
  }
  if (position < length) {
    if (!feof(file)) PERROR("fread");
    if (!logfilemode) fputc('\n', stderr);
    fputs("file is too short\n", stderr);
  }
  else
    showProgress(1, 0);

  if (fread(buffer, 1, 1, file) > 0)
    fputs("file contains trailing garbage\n", stderr);
  else if (!feof(file))
    PERROR("fread");
  verifyFile_final(&vfy);
  fputs("file is OK\n", stderr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq 0x6b7f(%rip), %rdi      # 0xc2f8
leaq 0x3211(%rip), %rsi      # 0x8991
callq 0x3911
movq %rax, %rdi
callq 0x2150
movq %rax, %rbx
addq $-0x20a, %rbx           # imm = 0xFDF6
movq 0x683a(%rip), %rax      # 0xbfd8
movq (%rax), %rsi
leaq 0x31ec(%rip), %rdi      # 0x8994
callq 0x2250
leaq 0xc(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x558a
xorl %r15d, %r15d
movl $0x10000, %r14d         # imm = 0x10000
leaq 0x6d86(%rip), %r12      # 0xc550
pushq $0x1
popq %r13
movq %rbx, %rbp
subq %r15, %rbp
jbe 0x5817
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3cee
cmpq %r14, %rbp
cmovaeq %r14, %rbp
movq 0x6af1(%rip), %rcx      # 0xc2e0
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x2370
cmpq %rbp, %rax
jb 0x582a
leaq 0xc(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x25a5
addq %rbp, %r15
jmp 0x57ce
pushq $0x1
popq %rdi
xorl %esi, %esi
callq 0x3cee
movq 0x67b0(%rip), %r14      # 0xbfd8
jmp 0x5864
movq 0x6aaf(%rip), %rdi      # 0xc2e0
callq 0x2380
testl %eax, %eax
movq 0x6799(%rip), %r14      # 0xbfd8
je 0x5892
cmpb $0x0, 0x6a44(%rip)      # 0xc28c
jne 0x5855
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rsi
leaq 0x3150(%rip), %rdi      # 0x89af
callq 0x2250
movq 0x6a75(%rip), %rcx      # 0xc2e0
leaq 0x6cde(%rip), %rdi      # 0xc550
pushq $0x1
popq %rdx
movq %rdx, %rsi
callq 0x2370
testq %rax, %rax
jne 0x58d9
movq 0x6a57(%rip), %rdi      # 0xc2e0
callq 0x2380
testl %eax, %eax
jne 0x58e8
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x22d0
movq (%r14), %rcx
leaq 0x3102(%rip), %rdi      # 0x89a9
pushq $0x5
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2480
movq (%r14), %rcx
leaq 0x2e78(%rip), %rdi      # 0x8737
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x2480
xorl %edi, %edi
callq 0x2180
pushq $0x1
popq %rdi
callq 0x22a0
movq (%r14), %rsi
leaq 0x30df(%rip), %rdi      # 0x89c2
callq 0x2250
leaq 0xc(%rsp), %rdi
callq 0x56d8
movq (%r14), %rsi
leaq 0x30e6(%rip), %rdi      # 0x89e2
callq 0x2250
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x60f6(%rip), %eax      # 0xc290
cmpq $0x3, %rax
ja 0x6243
leaq 0x1ec5(%rip), %rcx      # 0x8070
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x613d(%rip), %rdi      # 0xc2f8
popq %rbx
jmp 0x3a8d
movq 0x60f8(%rip), %rbx      # 0xc2c0
testq %rbx, %rbx
je 0x61ea
movq %rbx, %rdi
callq 0x2450
movq %rax, 0x635c(%rip)      # 0xc538
jmp 0x6216
popq %rbx
jmp 0x5761
popq %rbx
jmp 0x4eae
movq 0x6107(%rip), %rdi      # 0xc2f8
leaq 0x26a6(%rip), %rsi      # 0x889e
callq 0x3911
movq %rax, %rdi
callq 0x4ca0
movq %rax, 0x632c(%rip)      # 0xc538
testq %rax, %rax
jne 0x6245
callq 0x4eae
callq 0x5b28
testq %rbx, %rbx
je 0x6243
movq 0x60d1(%rip), %rdi      # 0xc2f8
leaq 0x2670(%rip), %rsi      # 0x889e
callq 0x3911
movq 0x62fe(%rip), %rsi      # 0xc538
movq %rax, %rdi
popq %rbx
jmp 0x4d99
popq %rbx
retq
movq 0x5d8c(%rip), %rcx      # 0xbfd8
movq (%rcx), %rdi
leaq 0x29ac(%rip), %rsi      # 0x8c02
movq %rax, %rdx
xorl %eax, %eax
callq 0x2340
jmp 0x6216
// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, (%rdx)
movq 0x312d(%rip), %rax      # 0x6fa8
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rsi
movl $0x6, (%rsi)
pushq $0x1
popq %rdi
movq %rbx, %r8
callq 0x2150
movq %rbx, %rdi
callq 0x2180
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2
popq %rdi
movq %rbx, %rsi
callq 0x1060
pushq $0x3
popq %rdi
movq %rbx, %rsi
callq 0x1060
leaq 0xe94(%rip), %rdi       # 0x2048
callq 0x1030
callq 0x1050
leaq 0xe3f(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
popq %rbx
retq