// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq 0x7af5(%rip), %rax      # 0xd2e8
movq %rax, -0x40(%rbp)
movq 0x7aea(%rip), %rdi      # 0xd2e8
callq 0x20c0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x39b0
movq %rax, %rdi
movl $0x10, %esi
callq 0x43a0
movq %rax, -0x10(%rbp)
movq 0x7ac5(%rip), %rax      # 0xd2f0
movq %rax, -0x38(%rbp)
movq 0x7aba(%rip), %rdi      # 0xd2f0
callq 0x20c0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x39b0
movq %rax, %rdi
movl $0x10, %esi
callq 0x43a0
movq %rax, -0x18(%rbp)
movl $0x39, %edi
callq 0x2300
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0xd, %edx
callq 0x2100
movq -0x28(%rbp), %rax
addq $0xd, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x4, %edx
callq 0x2100
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xb, %edx
callq 0x2100
movq -0x28(%rbp), %rax
addq $0xb, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x2, %edx
callq 0x2100
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x15, %rsi
movl $0xb, %edx
callq 0x2100
movq -0x28(%rbp), %rax
addq $0xb, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x2, %edx
callq 0x2100
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x13, %rsi
movl $0xd, %edx
callq 0x2100
movq -0x28(%rbp), %rax
addq $0xd, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
cmpl $0x1, 0x7932(%rip)      # 0xd2a4
jb 0x5990
movq 0x765d(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x4a9d(%rip), %rsi      # 0xa426
movb $0x0, %al
callq 0x2330
movq -0x20(%rbp), %rdi
callq 0x44a0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2280
movq -0x10(%rbp), %rdi
callq 0x2280
movq -0x18(%rbp), %rdi
callq 0x2280
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)