// File: /workspace/github_cpp_makefile_star2_O3/4n6ist[P]usn_analytics/lib/usnjrnl.cpp
// Function: UsnJrnl::UsnJrnl(char*, char*)
UsnJrnl::UsnJrnl(char *ifname, char *odname) {
  offset = 0;

  if((fp_in = fopen(ifname, "rb")) == NULL) {
    perror("Input File Error");
    exit(EXIT_FAILURE);
  }
  
  string ofreport;
  ofreport = string(odname) + SEP + "usn_analytics_report.txt";
  fp_ofreport = fopen(ofreport.c_str(), "w");
      
  if(fp_ofreport == NULL ) {
    perror("Output File Error");
    exit(EXIT_FAILURE);
  }

  file_size = get_file_size(ifname);
  printf("%llu bytes (%s)\n", file_size, ifname);  
  fprintf(fp_ofreport, "%llu bytes (%s)\n", file_size, ifname);     
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x70(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, 0x70(%rdi)
movq %rcx, 0x78(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movq %rcx, 0x60(%rdi)
movq %rax, 0x80(%rdi)
movq %rax, 0x88(%rdi)
movq %rcx, 0x90(%rdi)
leaq 0xa0(%rdi), %rax
movl %ecx, 0xa0(%rdi)
movq %rcx, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
movq %rax, 0xb8(%rdi)
movq %rcx, 0xc0(%rdi)
leaq 0xd0(%rdi), %rax
movl %ecx, 0xd0(%rdi)
movq %rcx, 0xd8(%rdi)
movq %rax, 0xe0(%rdi)
movq %rax, 0xe8(%rdi)
movq %rcx, 0xf0(%rdi)
movq %rcx, 0x8(%rdi)
leaq 0xb7de(%rip), %rsi      # 0xf048
movq %r14, %rdi
callq 0x32d0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x3a40
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x58(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r15, %rsi
callq 0x8e9c
leaq 0x109c9(%rip), %rax     # 0x14279
movsbl (%rax), %r8d
leaq 0x58(%rsp), %rdi
movq 0x8(%rdi), %rsi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x3490
leaq 0x28(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x38f0
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x38f8
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x18(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb741(%rip), %rsi      # 0xf05c
callq 0x34a0
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x394d
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x3954
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x78(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x3300
movq (%r15), %rdi
cmpq %rbp, %rdi
je 0x3995
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x39ac
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39c7
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
leaq 0xbfcf(%rip), %rsi      # 0xf9a2
callq 0x32d0
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x3a45
movq %r14, %rdi
callq 0xc7f1
movq %rax, (%rbx)
leaq 0xb694(%rip), %r15      # 0xf087
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3040
movq (%rbx), %rdx
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3350
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a2e
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x34e5
callq 0x34d0
jmp 0x3a8c
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x3a6f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3a6f
movq %rax, 0x10(%rsp)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a91
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3a91
movq %rax, 0x10(%rsp)
leaq 0x50(%rbx), %r15
leaq 0x68(%rbx), %r14
leaq 0x98(%rbx), %r13
leaq 0xc8(%rbx), %rbp
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x3abe
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x20(%rbx), %r12
movq %rbp, %rdi
callq 0x949a
movq %r13, %rdi
callq 0x949a
movq %r14, %rdi
callq 0x9512
movq %r15, %rdi
callq 0x8e6c
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3af7
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq (%r12), %rdi
testq %rdi, %rdi
je 0x3b0c
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x10(%rsp), %rdi
callq 0x3460