// File: /workspace/github_cpp_makefile_star2_O1/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 0xb7ce(%rip), %rsi      # 0xf048
movq %r14, %rdi
callq 0x32d0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x3a50
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 0x8e42
leaq 0x109c1(%rip), %rax     # 0x14281
movsbl (%rax), %r8d
leaq 0x58(%rsp), %rdi
movq 0x8(%rdi), %rsi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x34a0
leaq 0x28(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3900
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x3908
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 0xb731(%rip), %rsi      # 0xf05c
callq 0x34b0
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x395d
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x3964
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 0x39a5
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x39bc
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39d7
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
leaq 0xbfc0(%rip), %rsi      # 0xf9a3
callq 0x32d0
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x3a55
movq %r14, %rdi
callq 0xc823
movq %rax, (%rbx)
leaq 0xb684(%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 0x3360
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a3e
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 0x34f5
callq 0x34e0
jmp 0x3a9c
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x3a7f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3a7f
movq %rax, 0x10(%rsp)
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3aa1
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3aa1
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 0x3ace
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x20(%rbx), %r12
movq %rbp, %rdi
callq 0x9440
movq %r13, %rdi
callq 0x9440
movq %r14, %rdi
callq 0x94b8
movq %r15, %rdi
callq 0x8e12
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3b07
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq (%r12), %rdi
testq %rdi, %rdi
je 0x3b1c
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x10(%rsp), %rdi
callq 0x3470