// File: /workspace/github_cpp_makefile_star2_O3/4n6ist[P]usn_analytics/lib/usnrecord.cpp
// Function: UsnRecord::WriteRecord(_IO_FILE*)
int UsnRecord::WriteRecord(FILE *fp) {
  string reasons_s, attrs_s, timestamp_s;
  fprintf(fp, "\"%llu\"\t", offset);
  fprintf(fp, "\"%u\"\t", usn_record.RecordLength);
  fprintf(fp, "\"%hu\"\t", usn_record.MajorVersion);
  fprintf(fp, "\"%hu\"\t", usn_record.MinorVersion);
  fprintf(fp, "\"%u\"\t", cid);
  fprintf(fp, "\"%hu\"\t", cid_seq);
  fprintf(fp, "\"%u\"\t", pid);
  fprintf(fp, "\"%hu\"\t", pid_seq);
  fprintf(fp, "\"%llu\"\t", usn_record.Usn);
  timestamp_s = parse_datetimemicro(usn_record.TimeStamp, lt);
  fprintf(fp, "\"%s\"\t", timestamp_s.c_str());
  parse_reason(usn_record.Reason, &(reasons_s));
  fprintf(fp, "\"%s(%08x)\"\t", reasons_s.c_str(), usn_record.Reason);
  fprintf(fp, "\"%u\"\t", usn_record.SourceInfo);
  fprintf(fp, "\"%u\"\t", usn_record.SecurityId);
  parse_file_attr(usn_record.FileAttributes, &(attrs_s));
  fprintf(fp, "\"%s(%04x)\"\t", attrs_s.c_str(), usn_record.FileAttributes);
  fprintf(fp, "\"%hu\"\t", usn_record.FileNameLength);
  fprintf(fp, "\"%hu\"\t", usn_record.FileNameOffset);  
  fprintf(fp, "\"%s\"", file_name.c_str());
  fprintf(fp, "\n");
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
movq 0x4c(%rdi), %rdx
leaq 0x3933(%rip), %r15      # 0xf717
movq %rsi, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
movl 0x10(%r14), %edx
leaq 0x3923(%rip), %r12      # 0xf71f
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3350
movzwl 0x14(%r14), %edx
leaq 0x3910(%rip), %r13      # 0xf725
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3350
movzwl 0x16(%r14), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3350
movl 0x54(%r14), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3350
movzwl 0x58(%r14), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3350
movl 0x5a(%r14), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3350
movzwl 0x5e(%r14), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3350
movq 0x28(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
movq 0x30(%r14), %rsi
leaq 0x83e2(%rip), %rax      # 0x14278
movzbl (%rax), %edx
leaq 0x68(%rsp), %rdi
callq 0xc9d5
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %r15
movq %r15, %rsi
callq 0x3300
movq (%r15), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xbecf
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x48(%rsp), %rdx
leaq 0x3851(%rip), %rsi      # 0xf72c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3350
movl 0x38(%r14), %edi
leaq 0x28(%rsp), %rsi
callq 0xd383
movq 0x28(%rsp), %rdx
movl 0x38(%r14), %ecx
leaq 0x382f(%rip), %rsi      # 0xf732
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3350
movl 0x3c(%r14), %edx
leaq 0x3807(%rip), %r15      # 0xf71f
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
movl 0x40(%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
movl 0x44(%r14), %edi
leaq 0x8(%rsp), %rsi
callq 0xcd87
movq 0x8(%rsp), %rdx
movl 0x44(%r14), %ecx
leaq 0x37ea(%rip), %rsi      # 0xf73e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3350
movzwl 0x48(%r14), %edx
leaq 0x37bb(%rip), %r15      # 0xf725
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
movzwl 0x4a(%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
movq 0x60(%r14), %rdx
leaq 0x37b6(%rip), %rsi      # 0xf74a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3350
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3310
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbfc2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbfde
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xbffa
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc010
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc02a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xc046
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc062
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x3460