// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x65a9(%rip), %rsi      # 0xd538
leaq 0x397d(%rip), %rdi      # 0xa913
callq 0x2320
cmpl $0x0, %eax
jne 0x6fb3
movq 0x6029(%rip), %rax      # 0xcfd0
movq (%rax), %rax
movq %rax, 0x632f(%rip)      # 0xd2e0
jmp 0x6fcd
movq 0x657e(%rip), %rdi      # 0xd538
leaq 0x3954(%rip), %rsi      # 0xa915
callq 0x2270
movq %rax, 0x6313(%rip)      # 0xd2e0
cmpq $0x0, 0x630b(%rip)      # 0xd2e0
jne 0x7034
jmp 0x6fd9
movq 0x5ff8(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x382c(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movq 0x5fe0(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x3916(%rip), %rsi      # 0xa918
movb $0x0, %al
callq 0x2330
movq 0x5fc8(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x378f(%rip), %rsi      # 0xa7a9
movb $0x0, %al
callq 0x2330
xorl %eax, %eax
movl %eax, %edi
callq 0x2180
movl $0x1, %edi
callq 0x2290
leaq -0xb(%rbp), %rdi
xorl %esi, %esi
movl $0xb, %edx
callq 0x2110
leaq -0xb(%rbp), %rdi
movq 0x6291(%rip), %rcx      # 0xd2e0
movl $0xa, %esi
movl $0x1, %edx
callq 0x2360
cmpq $0x1, %rax
jae 0x70d2
movq 0x6275(%rip), %rdi      # 0xd2e0
callq 0x2370
cmpl $0x0, %eax
jne 0x70d2
jmp 0x7077
movq 0x5f5a(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x378e(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movq 0x5f42(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x330b(%rip), %rsi      # 0xa3ab
movb $0x0, %al
callq 0x2330
movq 0x5f2a(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x36f1(%rip), %rsi      # 0xa7a9
movb $0x0, %al
callq 0x2330
xorl %eax, %eax
movl %eax, %edi
callq 0x2180
movl $0x1, %edi
callq 0x2290
movq 0x6207(%rip), %rdi      # 0xd2e0
callq 0x2370
cmpl $0x0, %eax
je 0x7137
jmp 0x70e5
movq 0x5eec(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x3720(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movq 0x5ed4(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x32b0(%rip), %rsi      # 0xa3be
movb $0x0, %al
callq 0x2330
movq 0x5ebc(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x36f0(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movl $0x1, %edi
callq 0x2290
leaq -0xb(%rbp), %rdi
leaq 0x37e9(%rip), %rsi      # 0xa92b
callq 0x2320
cmpl $0x0, %eax
je 0x71a0
jmp 0x714e
movq 0x5e83(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x36b7(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movq 0x5e6b(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x37bf(%rip), %rsi      # 0xa936
movb $0x0, %al
callq 0x2330
movq 0x5e53(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x3687(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movl $0x1, %edi
callq 0x2290
callq 0x55a0
movq %rax, 0x614c(%rip)      # 0xd2f8
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)