// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x5e16(%rip), %rdi      # 0xd2f8
leaq 0x351c(%rip), %rsi      # 0xaa05
callq 0x49e0
movq %rax, %rdi
callq 0x2150
subq $0x20a, %rax            # imm = 0x20A
movq %rax, -0xc0(%rbp)
movq 0x5ace(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
leaq 0x34f4(%rip), %rdi      # 0xaa08
callq 0x2240
leaq -0xac(%rbp), %rdi
movl $0x1, %esi
callq 0x71c0
movq $0x0, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
cmpq -0xc0(%rbp), %rax
jae 0x7603
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x5050
movq -0xc0(%rbp), %rax
subq -0xc8(%rbp), %rax
cmpq $0x10000, %rax          # imm = 0x10000
jae 0x7589
movq -0xc0(%rbp), %rax
subq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0x7597
movl $0x10000, %eax          # imm = 0x10000
movq %rax, -0xd0(%rbp)
jmp 0x7597
movq -0xd0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdx
movq 0x5d2d(%rip), %rcx      # 0xd2e0
leaq 0x5f86(%rip), %rdi      # 0xd540
movl $0x1, %esi
callq 0x2360
cmpq -0xb8(%rbp), %rax
jae 0x75cf
jmp 0x7603
movq -0xb8(%rbp), %rdx
leaq -0xac(%rbp), %rdi
leaq 0x5f5c(%rip), %rsi      # 0xd540
callq 0x7390
movq -0xb8(%rbp), %rax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
jmp 0x7535
movq -0xc8(%rbp), %rax
cmpq -0xc0(%rbp), %rax
jae 0x76ba
movq 0x5cc2(%rip), %rdi      # 0xd2e0
callq 0x2370
cmpl $0x0, %eax
jne 0x7685
jmp 0x762a
movq 0x59a7(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x31db(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movq 0x598f(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x33ca(%rip), %rsi      # 0xaa1d
movb $0x0, %al
callq 0x2330
movq 0x5977(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x313e(%rip), %rsi      # 0xa7a9
movb $0x0, %al
callq 0x2330
xorl %eax, %eax
movl %eax, %edi
callq 0x2180
movl $0x1, %edi
callq 0x2290
cmpl $0x0, 0x5c10(%rip)      # 0xd29c
jne 0x76a2
movq 0x5943(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x22c0
movq 0x592f(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
leaq 0x3370(%rip), %rdi      # 0xaa23
callq 0x2240
jmp 0x76c8
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x5050
movq 0x5c11(%rip), %rcx      # 0xd2e0
leaq 0x5e6a(%rip), %rdi      # 0xd540
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2360
cmpq $0x0, %rax
jbe 0x7701
movq 0x58e8(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
leaq 0x333c(%rip), %rdi      # 0xaa36
callq 0x2240
jmp 0x7771
movq 0x5bd8(%rip), %rdi      # 0xd2e0
callq 0x2370
cmpl $0x0, %eax
jne 0x776f
jmp 0x7714
movq 0x58bd(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x30f1(%rip), %rsi      # 0xa816
movb $0x0, %al
callq 0x2330
movq 0x58a5(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x32e0(%rip), %rsi      # 0xaa1d
movb $0x0, %al
callq 0x2330
movq 0x588d(%rip), %rax      # 0xcfd8
movq (%rax), %rdi
leaq 0x3054(%rip), %rsi      # 0xa7a9
movb $0x0, %al
callq 0x2330
xorl %eax, %eax
movl %eax, %edi
callq 0x2180
movl $0x1, %edi
callq 0x2290
jmp 0x7771
leaq -0xac(%rbp), %rdi
callq 0x73c0
movq 0x5854(%rip), %rax      # 0xcfd8
movq (%rax), %rsi
leaq 0x32c8(%rip), %rdi      # 0xaa56
callq 0x2240
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)