// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0xac, %edx
callq 0x2110
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xa8(%rax)
movq 0x6105(%rip), %rdi      # 0xd2f8
movq -0x8(%rbp), %rax
movl 0xa8(%rax), %ecx
leaq 0x370c(%rip), %rsi      # 0xa910
leaq 0x3236(%rip), %rax      # 0xa441
cmpl $0x0, %ecx
cmovneq %rax, %rsi
callq 0x49e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7231
movq -0x18(%rbp), %rdi
callq 0x20c0
cmpq $0x30, %rax
je 0x7285
jmp 0x7233
movq 0x5d9e(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x35d2(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movq 0x5d86(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x36ec(%rip), %rsi      # 0xa948
movb $0x0, %al
callq 0x2330
movq 0x5d6e(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x35a2(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movl $0x1, %edi
callq 0x2290
movl $0x1, -0x24(%rbp)
cmpl $0x10, -0x24(%rbp)
jge 0x72dd
movq -0x18(%rbp), %rax
imull $0x3, -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
imull $0x3, -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x728c
movq -0x18(%rbp), %rax
movb $0x0, 0x20(%rax)
cmpl $0x1, 0x5fb8(%rip)      # 0xd2a4
jb 0x7329
movq 0x5ce3(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xa8(%rax), %ecx
leaq 0x3696(%rip), %rdx      # 0xa99f
leaq 0x3689(%rip), %rax      # 0xa999
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movq -0x18(%rbp), %rcx
leaq 0x3656(%rip), %rsi      # 0xa978
movb $0x0, %al
callq 0x2330
movq -0x18(%rbp), %rdi
callq 0x44a0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x98(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x2110
movq -0x8(%rbp), %rdi
callq 0x2580
movq -0x18(%rbp), %rdi
callq 0x2280
movq -0x20(%rbp), %rdi
callq 0x2280
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)